-
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
fs: fix error codes for fs.cp
#41106
Conversation
The context passed into this error must have `.code`, `.syscall` and `.message`. Fixes: nodejs#41104
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.
Tests?
This only affects the error message, which is usually something we don't test. Or should I add one in EDIT: I've added a linter rule instead, PTAL. |
This comment has been minimized.
This comment has been minimized.
Ah right, I see now. nvm. |
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. Checking a single error message might be good for the case that the SystemError implementation would change.
Landed in 2f60225 |
The context passed into this error must have `.code`, `.syscall` and `.message`. Fixes: #41104 PR-URL: #41106 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
The context passed into this error must have `.code`, `.syscall` and `.message`. Fixes: #41104 PR-URL: #41106 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
The context passed into this error must have `.code`, `.syscall` and `.message`. Fixes: #41104 PR-URL: #41106 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
The context passed into this error must have `.code`, `.syscall` and `.message`. Fixes: #41104 PR-URL: #41106 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
The context passed into this error must have `.code`, `.syscall` and `.message`. Fixes: nodejs#41104 PR-URL: nodejs#41106 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
The context passed into this error must have `.code`, `.syscall` and `.message`. Fixes: #41104 PR-URL: #41106 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
The context passed into this error must have
.code
,.syscall
and.message
.node/lib/internal/errors.js
Lines 215 to 216 in 36c0ac0
Maybe it'd worth adding a ESLint rule to catch this kind of mistakes.
Fixes: #41104