-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request object's AbortSignal does not abort with the expected reason #43874
Comments
I believe this is spec issue: There was an ongoing work on throwing Although I'd absolutely prefer throwing |
I think this is a bug with The definition of |
Although this issue doesn't involve the |
Yep, it seems so.
Right now it looks like spec is softly contradicting itself there. Implementations of fetch('https://github.com/nodejs/node/issues/43874', {
signal: AbortSignal.timeout(1)
}).catch(err => {
console.error(err.name, err.code, err.message, err.cause);
}); From my understanding, this is issue you're searching for: whatwg/dom#1030. Also, anticipated compatibility breakage is partially addressed in whatwg/dom#1090: since |
I feel strongly that core APIs that reject with |
Description --- Those errors occur on the confluence connector when fetch is aborted. Apparently a timeout can cause either an "AbortError" or a "TimeoutError" nodejs/node#43874
Description --- Those errors occur on the confluence connector when fetch is aborted. Apparently a timeout can cause either an "AbortError" or a "TimeoutError" nodejs/node#43874
Description --- Those errors occur on the confluence connector when fetch is aborted. Apparently a timeout can cause either an "AbortError" or a "TimeoutError" nodejs/node#43874
Version
v18.5.0
Platform
Linux foo 5.15.0-41-generic #44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
The
Request
's signal should abort with the same reason as the signal provided duringRequest
construction. (In this case, aTimeoutError
.)What do you see instead?
The
Request
's signal aborts with a different reason from the signal provided during construction. In this repro, theTimeoutError
is converted toAbortError
, which is a loss of information.FWIW, recent versions of both Chrome and Firefox perform as expected (
TimeoutError
seen by both event handlers).Additional information
It seems the signal provided during
Request
construction is wrapped by a new abort controller/signal (see the output:"same? false"
). Is thereason
of the underlying signal passed to the new controller'sabort()
call? Looks like no.The text was updated successfully, but these errors were encountered: