FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: clarify http error events after calling destroy() by zbjornson · Pull Request #46903 · nodejs/node · GitHub

/ node Public

doc: clarify http error events after calling destroy() - #46903

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
zbjornson:doc-http-destroy
Mar 26, 2023
Merged

doc: clarify http error events after calling destroy()#46903
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
zbjornson:doc-http-destroy

Conversation

Copy link
Copy Markdown
Contributor

Clarifies the errors after calling destroy(), as well as aborting a passed AbortController.


Aside, the statement "Passing an AbortSignal and then calling abort() on the corresponding AbortController will 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, calling controller.abort() after the 'response' event has no effect in v16.

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/http
  • @nodejs/net

nodejs-github-bot added doc Issues and PRs related to the documentations. http Issues or PRs related to the http subsystem. labels Mar 1, 2023
Comment thread doc/api/http.md
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Was going for brevity. "Itself" doesn't seem to add clarity. What do you think?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I dont think its a necessary change to this pr, Id leave it as it was previously

Comment thread doc/api/http.md
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'`

marco-ippolito Mar 2, 2023
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
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'`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This parallels the wording in the bullet points above and makes it clear that the argument is an Error and not a string.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It sounds a bit reduntant to me, feel free to ignore

mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

lgtm

lpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 26, 2023
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 26, 2023
nodejs-github-bot merged commit f0ade70 into nodejs:main Mar 26, 2023

Copy link
Copy Markdown
Collaborator

Landed in f0ade70

zbjornson deleted the doc-http-destroy branch March 26, 2023 21:09
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>
RafaelGSS mentioned this pull request Apr 6, 2023
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

Labels

doc Issues and PRs related to the documentations. http Issues or PRs related to the http subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL