Skip to content

Commit

Permalink
Merge pull request #6700 from realm/nh/wasm/report_http_error
Browse files Browse the repository at this point in the history
Reporting correct error message on HTTP errors for Emscripten target
  • Loading branch information
nhachicha authored Jun 7, 2023
2 parents 895d480 + 795bb4b commit 9c31164
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static void error(emscripten_fetch_t* fetch)
emscripten_fetch_close(fetch);
});
std::unique_ptr<FetchState> state(reinterpret_cast<FetchState*>(fetch->userData));
state->completion_block({0, 0, {}, {}, {}});
state->completion_block({fetch->status, 0, {}, std::string(fetch->data, size_t(fetch->numBytes)), ErrorCodes::HTTPError});
}

void EmscriptenNetworkTransport::send_request_to_server(
Expand Down

0 comments on commit 9c31164

Please sign in to comment.