-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
doc: make error descriptions more concise #16954
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
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.
left a few comments, some are just adding a comma here or there, feel free to treat as nits :)
doc/api/errors.md
Outdated
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.
could --> could not?
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.
Done. I also removed properly
as it seems superfluous.
doc/api/errors.md
Outdated
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.
comma after disable FIPS mode
?
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.
done, thanks
doc/api/errors.md
Outdated
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 know it wasn't there originally, but should HTTP be changes to HTTP/2?
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.
It would seem so. Done.
doc/api/errors.md
Outdated
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.
comma after by the client
?
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.
done, thanks
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. FWIW, once the error conversion is complete, I'm planning a sprint of changes to fill in the details on these errors in the docs, including example code (where possible) showing how to trigger the error and an explanation on how to fix it.
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.
Making @maclover7 's nit explicit - otherwise looks like a nice positive change
@benjamingr I've addressed all of @maclover7's nits and also edited a few more messages that landed since I originally opened this. PTAL. (I left these changes in separate commits for easier reviewing if you don't want to read everything all over again.) |
LGTM |
@Trott just in case you haven't noticed I've approved those changes (after your commit but before your comment). |
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.
Left a bunch of suggestions...for better consistency 😅
doc/api/errors.md
Outdated
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.
There is an extra e in receivee
doc/api/errors.md
Outdated
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.
s/Streams/streams
?
doc/api/errors.md
Outdated
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.
s/Streams/streams
?
doc/api/errors.md
Outdated
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.
s/contains/contained/
?
doc/api/errors.md
Outdated
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.
The previous descriptions are using an attempt was made to...
, we may want to be consistent here.
doc/api/errors.md
Outdated
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.
Extra space at the end.
doc/api/errors.md
Outdated
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.
For consistency, An attempt was made to enable...but FIPS mode was not available.
doc/api/errors.md
Outdated
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.
s/is/was/
doc/api/errors.md
Outdated
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.
Maybe drop the when
?
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 I'll go with if
instead.
doc/api/errors.md
Outdated
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.
s/is/was/
Remove the practice of starting most error descriptions with "Used when" or wordier variations. Change errors of the form: > Used when the type of an asynchronous resource is invalid. ...to: > The type of an asynchronous resource was invalid. Change errors of the form: > The `'ERR_INVALID_CURSOR_POS'` is thrown specifically when a cursor on > a given stream is attempted to move to a specified row without a specified > column. ...to: > A cursor on a given stream cannot be moved to a specified row without > a specified column.
Addressed almost all of the awesome nits from @joyeecheung. PTAL |
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.
Thanks for bearing with me :D
Remove the practice of starting most error descriptions with "Used when" or wordier variations. Change errors of the form: > Used when the type of an asynchronous resource is invalid. ...to: > The type of an asynchronous resource was invalid. Change errors of the form: > The `'ERR_INVALID_CURSOR_POS'` is thrown specifically when a cursor on > a given stream is attempted to move to a specified row without a > specified column. ...to: > A cursor on a given stream cannot be moved to a specified row without > a specified column. PR-URL: nodejs#16954 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Landed in 959c425. |
Should this be backported to |
Remove the practice of starting most error descriptions with "Used when" or wordier variations. Change errors of the form: > Used when the type of an asynchronous resource is invalid. ...to: > The type of an asynchronous resource was invalid. Change errors of the form: > The `'ERR_INVALID_CURSOR_POS'` is thrown specifically when a cursor on > a given stream is attempted to move to a specified row without a > specified column. ...to: > A cursor on a given stream cannot be moved to a specified row without > a specified column. PR-URL: nodejs#16954 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
@MylesBorins Backport is in #17622 |
Remove the practice of starting most error descriptions with "Used when" or wordier variations. Change errors of the form: > Used when the type of an asynchronous resource is invalid. ...to: > The type of an asynchronous resource was invalid. Change errors of the form: > The `'ERR_INVALID_CURSOR_POS'` is thrown specifically when a cursor on > a given stream is attempted to move to a specified row without a > specified column. ...to: > A cursor on a given stream cannot be moved to a specified row without > a specified column. Backport-PR-URL: #17622 PR-URL: #16954 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Remove the practice of starting most error descriptions with "Used when" or wordier variations. Change errors of the form: > Used when the type of an asynchronous resource is invalid. ...to: > The type of an asynchronous resource was invalid. Change errors of the form: > The `'ERR_INVALID_CURSOR_POS'` is thrown specifically when a cursor on > a given stream is attempted to move to a specified row without a > specified column. ...to: > A cursor on a given stream cannot be moved to a specified row without > a specified column. Backport-PR-URL: #17622 PR-URL: #16954 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Remove the practice of starting most error descriptions with "Used when" or wordier variations. Change errors of the form: > Used when the type of an asynchronous resource is invalid. ...to: > The type of an asynchronous resource was invalid. Change errors of the form: > The `'ERR_INVALID_CURSOR_POS'` is thrown specifically when a cursor on > a given stream is attempted to move to a specified row without a > specified column. ...to: > A cursor on a given stream cannot be moved to a specified row without > a specified column. Backport-PR-URL: #17622 PR-URL: #16954 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
@Trott backports for v6.x and v8.x? Feel free to mark don't land if it's a hassle. |
Node.js error codes don't exist in 6.x so marking as dont-land for that version. They exist in 8.x so I'll take a closer look at that... |
Remove the practice of starting most error descriptions with "Used when" or wordier variations. Change errors of the form: > Used when the type of an asynchronous resource is invalid. ...to: > The type of an asynchronous resource was invalid. Change errors of the form: > The `'ERR_INVALID_CURSOR_POS'` is thrown specifically when a cursor on > a given stream is attempted to move to a specified row without a > specified column. ...to: > A cursor on a given stream cannot be moved to a specified row without > a specified column. PR-URL: nodejs#16954 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Remove the practice of starting most error descriptions with "Used when" or wordier variations. Change errors of the form: > Used when the type of an asynchronous resource is invalid. ...to: > The type of an asynchronous resource was invalid. Change errors of the form: > The `'ERR_INVALID_CURSOR_POS'` is thrown specifically when a cursor on > a given stream is attempted to move to a specified row without a > specified column. ...to: > A cursor on a given stream cannot be moved to a specified row without > a specified column. PR-URL: #16954 Backport-PR-URL: #17767 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Remove the practice of starting most error descriptions with "Used when" or wordier variations. Change errors of the form: > Used when the type of an asynchronous resource is invalid. ...to: > The type of an asynchronous resource was invalid. Change errors of the form: > The `'ERR_INVALID_CURSOR_POS'` is thrown specifically when a cursor on > a given stream is attempted to move to a specified row without a > specified column. ...to: > A cursor on a given stream cannot be moved to a specified row without > a specified column. PR-URL: #16954 Backport-PR-URL: #17767 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Remove the practice of starting most error descriptions with "Used when" or wordier variations. Change errors of the form: > Used when the type of an asynchronous resource is invalid. ...to: > The type of an asynchronous resource was invalid. Change errors of the form: > The `'ERR_INVALID_CURSOR_POS'` is thrown specifically when a cursor on > a given stream is attempted to move to a specified row without a > specified column. ...to: > A cursor on a given stream cannot be moved to a specified row without > a specified column. PR-URL: #16954 Backport-PR-URL: #17767 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Remove the practice of starting most error descriptions with "Used when"
or wordier variations.
Change errors of the form:
...to:
Change errors of the form:
...to:
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
errors doc