[26.0] Ignore aborted requests in rethrowSimple#22325
[26.0] Ignore aborted requests in rethrowSimple#22325mvdbeek merged 1 commit intogalaxyproject:release_26.0from
Conversation
773cc0b to
76dcc96
Compare
When the browser aborts a request (e.g. during page navigation), silently return from rethrowSimple instead of throwing. Carefully distinguishes genuine aborts from timeouts: ECONNABORTED is only swallowed when the message is exactly "Request aborted" (not a timeout), and ERR_CANCELED is only swallowed when the message does not mention "timeout". Fixes GALAXY-MAIN-4KSCZZZ0014Z6
76dcc96 to
28eb934
Compare
|
This PR was merged without a "kind/" label, please correct. |
|
This looks good and the intent makes sense, but Claude flagged something worth thinking about -- const { data, error } = await GalaxyApi().GET(...)
if (error) {
rethrowSimple(error);
}
return data.map(...) // TS knows data isn't undefined because rethrowSimple never returnsWith the Might be better to handle this at a higher level so the |
When the browser aborts a request (e.g. during page navigation), silently return from rethrowSimple instead of throwing. No downstream consumer will handle the result when the page is being torn down.
Fixes GALAXY-MAIN-4KSCZZZ0014Z6 / #22324
How to test the changes?
(Select all options that apply)
License