-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Node AbortError Behavior meeting #36084
Comments
Update, due to family reasons of a certain person we want to attend we'll try to make this next week and not the week after. I will update the doodle soon |
Update: new doodle, sorry https://doodle.com/poll/ug26rc9cnmeuacr4 ping @MadaraUchiha @ronag and @mcollina |
Done |
Looks like we converged on a time :] I've sent you all a calendar invite with a zoom link - if anyone else wants to attend you are welcome to (send me an email and I'll add you to the invite). The time is also updated on the doodle. |
@benjamingr I don't think I received an invite. |
I sent it to your iCloud account @ronag - I will re-invite you |
It ended up in spam. Fixed. Thanks! |
I don't think I got an invite btw |
@jakearchibald sorry, I only sent it to people who filled the doodle - I sent you an invite now :] |
Made an empty doc to (hopefully) summarise during the meeting https://docs.google.com/document/d/1aZzdQbo2G2wpGewxnkXaBoY0z9BQgv_caq9651g-OLs/edit?usp=sharing |
@benjamingr can you send me an invite to the meeting as well? |
Nevermind I see I'm too late from the doodle. |
Hey sorry @mhdawson the meeting just happened the minutes are here: https://docs.google.com/document/d/1aZzdQbo2G2wpGewxnkXaBoY0z9BQgv_caq9651g-OLs/edit We can discuss any compelling arguments to change the decision but it was basically: -We want cancellation to be an exception (on streams in particular) with a
I will update the PR at #36048 tomorrow :] |
@benjamingr thanks for the summary :) |
I'm really happy with the direction here, particularly "Use .name - startSpinner();
try {
await doThing({ signal });
} catch (error) {
if (error.name === 'AbortError') return;
reportError(error);
} finally {
stopSpinner();
} |
I wonder if we can encourage folks to throw the right kind of error in the case of abort? whatwg/dom#927 |
I've aligned the behaviour of http.request to the consensus #36048 http.request will throw with an error, after merging it I'll work on the draft PR for (general) readable streams. |
- Builds on nodejs#36048 and nodejs#36084 - Modify test to verify this fact
We added an `AbortError` with the same code and name as the web's as part of the consensus in nodejs#36084 but never actually documented the error in our error codes list. This PR adds the error code.
We added an `AbortError` with the same code and name as the web's as part of the consensus in #36084 but never actually documented the error in our error codes list. This PR adds the error code.
We added an `AbortError` with the same code and name as the web's as part of the consensus in #36084 but never actually documented the error in our error codes list. This PR adds the error code. PR-URL: #36319 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
We added an `AbortError` with the same code and name as the web's as part of the consensus in #36084 but never actually documented the error in our error codes list. This PR adds the error code. PR-URL: #36319 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
We added an `AbortError` with the same code and name as the web's as part of the consensus in #36084 but never actually documented the error in our error codes list. This PR adds the error code. PR-URL: #36319 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
We added an `AbortError` with the same code and name as the web's as part of the consensus in #36084 but never actually documented the error in our error codes list. This PR adds the error code. PR-URL: #36319 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Hey, the issue of "what errors do we abort with?" was raised up multiple times in PRs by several users.
Other than "because of the primitive, aborting should always cause an error" I'm not sure we have consensus on anything.
I figured it would be useful to get interested parties in one room a-la-summit-style and talk this through.
Please feel free to suggest items for the agenda below.
Pinging people I talked to about this from Node in issues:
Pinging people I talked to about this as well but are not node core:
I'm also going to ping @jakearchibald in case he can make it because I think his feedback would be very valuable, though I know he's busy - worth a shot :]
I want to make it clear that participation is not limited to the above people or to people from the Node org or any standards body. If you are interested in cancellation and feel like you can contribute to this decision please speak up and let me know.
Doodle
https://doodle.com/poll/ug26rc9cnmeuacr4
Agenda
.code
s or the same code?code
s for Node specific APIs and provide.name === 'AbortError'
for web compatibility?Out of scope:
The text was updated successfully, but these errors were encountered: