fs: only show deprecation warning when error code matches#56549
fs: only show deprecation warning when error code matches#56549nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
BridgeAR
left a comment
There was a problem hiding this comment.
I believe all Node.js errors should trigger the warning and only programmer errors in Node.js code should not be caught. Is that correct? We don't yet have such utility method to check that. We could however check for any error code existence. It should not exist on regular programmer errors.
IMO that's a separate issue (IIUC you're complaining about the fact we blindly catch any error, instead of rethrowing non-Node.js ones). What this PR is addressing is that the warning should only appear when there's a ARG_TYPE error (as that's what has been deprecated). |

The deprecation is only for invalid types, it could be confusing the warning show up for an unrelated error.
Refs: #55753