-
Notifications
You must be signed in to change notification settings - Fork 30k
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.cp throws error with message 'cp returned undefined' #41104
Labels
fs
Issues and PRs related to the fs subsystem / file system.
Comments
aduh95
added a commit
to aduh95/node
that referenced
this issue
Dec 7, 2021
The context passed into this error must have `.code`, `.syscall` and `.message`. Fixes: nodejs#41104
Linkgoron
pushed a commit
to Linkgoron/node
that referenced
this issue
Jan 31, 2022
The context passed into this error must have `.code`, `.syscall` and `.message`. Fixes: nodejs#41104 PR-URL: nodejs#41106 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
17.2.0
Platform
No response
Subsystem
No response
What steps will reproduce the bug?
This throws as expected ERR_FS_CP_EINVAL.
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
What do you see instead?
Additional information
I'm not sure if this is a bug or intentional behavior but seeing
undefined
in an error message was unexpected.node/lib/internal/fs/cp/cp.js
Lines 80 to 85 in 87d6fd7
node/lib/internal/errors.js
Lines 225 to 226 in c8a0404
Based on the code should new ERR_FS_CP_EINVAL pass
code: EINVAL
, or should SystemError usecontext.code ?? context.errno
, or is this the intended behavior?The text was updated successfully, but these errors were encountered: