-
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
err: document ABORT_ERR code #36319
err: document ABORT_ERR code #36319
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
doc/api/errors.md
Outdated
@@ -612,6 +612,16 @@ A human-readable string describing the reason for the error. | |||
<a id="nodejs-error-codes"></a> | |||
## Node.js error codes | |||
|
|||
<a id="ERR_ABORT"></a> | |||
### `ABRT_ERR` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### `ABRT_ERR` | |
### `ABRT_ERR` | |
<!-- YAML | |
added: v15.0.0 | |
--> |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically it's not 15.0 and this code existed on DOMException beforehand and users could craft it. The actual non DOMException AbortError is 15.2 - I am not sure what this should say?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should say whatever is the first version in which Node.js actually throws errors with this code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What version first had DOMException? 8?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused about this code. Could you point me to where it is defined? I cannot find any occurence of ABRT_ERR
in the source code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@targos wow, we all missed the typo - it's ABORT_ERR
and not ABRT_ERR
.
I'll push a fix, the error is defined in two places - in internal/errors.j
(as class AbortError extends Error {
) and in lib/internal/per_context/domexception.js
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I didn't even think it could be a typo!
So I checked and v15.0.0 is indeed the first version where we throw errors with that code. I don't think we should mention versions where users could somehow do it themselves.
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.
6152951
to
dde4ae4
Compare
I think this probably needed a rebase 🤔 |
Landed in a2a2ff3 |
This commit was added to master without metadata. Not sure there's much to do at this point other than notify @nodejs/releasers so they can work around it in releases. (Actually, I'd be OK with a force push to fix if there was consensus on @nodejs/tsc. It's been 6 hours so far....) |
+1 to force-push. |
When I rebase against master, I scan the new commits to see what's been landed. I never use the bring-master-up-to-date feature in node-core-utils and always do it manually before landing anything specifically so I can do this quick scan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Belated LGTM
In addition to no metadata, it also has an invalid subsystem ( |
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]>
Force pushed to fix metadata and subsystem stuff. Landed in 13e2170 |
@Trott thanks, what did I do wrong?
(Next commands are: I rant lint & tests and then pushed) |
You have to answer "Yes" to this question, otherwise the commit message is not amended, so the metadata is not added to it About the subsystem, I thought it was validated by |
Thanks, my bad. I thought that it's not possible to land stuff with I'll just check the commit log before pushing the next few times in case there is more stuff I miss. |
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 aspart of the consensus in #36084 but
never actually documented the error in our error codes list.
This PR adds the error code.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes