doc: clarify http error events after calling destroy()#46903
Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom Mar 26, 2023
Merged
doc: clarify http error events after calling destroy()#46903nodejs-github-bot merged 1 commit intonodejs:mainfrom
nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
| Passing an `AbortSignal` and then calling `abort()` on the corresponding | ||
| `AbortController` will behave the same way as calling `.destroy()` on the | ||
| request itself. | ||
| request. Specifically, the `'error'` event will be emitted with an error with |
Member
There was a problem hiding this comment.
Nit
Suggested change
| request. Specifically, the `'error'` event will be emitted with an error with | |
| request itself. Specifically, the `'error'` event will be emitted with an error with |
Contributor
Author
There was a problem hiding this comment.
Was going for brevity. "Itself" doesn't seem to add clarity. What do you think?
Member
There was a problem hiding this comment.
I dont think its a necessary change to this pr, Id leave it as it was previously
Comment on lines
+3725
to
+3726
| request. Specifically, the `'error'` event will be emitted with an error with | ||
| the message `'AbortError: The operation was aborted'`, the code `'ABORT_ERR'` |
Member
There was a problem hiding this comment.
Suggested change
| request. Specifically, the `'error'` event will be emitted with an error with | |
| the message `'AbortError: The operation was aborted'`, the code `'ABORT_ERR'` | |
| request. Specifically, the `'error'` event will be emitted with the message `'AbortError: The operation was aborted'`, the code `'ABORT_ERR'` |
Contributor
Author
There was a problem hiding this comment.
This parallels the wording in the bullet points above and makes it clear that the argument is an Error and not a string.
Member
There was a problem hiding this comment.
It sounds a bit reduntant to me, feel free to ignore
ShogunPanda
approved these changes
Mar 2, 2023
lpinca
approved these changes
Mar 26, 2023
Collaborator
|
Landed in f0ade70 |
RafaelGSS
pushed a commit
that referenced
this pull request
Apr 5, 2023
PR-URL: #46903 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Merged
RafaelGSS
pushed a commit
that referenced
this pull request
Apr 6, 2023
PR-URL: #46903 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
RafaelGSS
pushed a commit
that referenced
this pull request
Apr 7, 2023
PR-URL: #46903 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams
pushed a commit
that referenced
this pull request
Jul 6, 2023
PR-URL: #46903 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clarifies the errors after calling
destroy(), as well as aborting a passed AbortController.Aside, the statement "Passing an
AbortSignaland then callingabort()on the correspondingAbortControllerwill behave the same way as calling.destroy()" appears correct for Node.js v19, but incorrect for Node.js v16 (didn't test versions between those). Specifically, callingcontroller.abort()after the'response'event has no effect in v16.