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
lib: aggregate errors to avoid error swallowing #39985
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Voltrex <mohammadkeyvanzade94@gmail.com>
Missing tests? |
Most of this stuff is hard to test reliably (I didn't find a way to generate an error on closing a file descriptor), but I did add a test for |
Ping @nodejs/tsc for reviews. |
I guess some of these are in fact exclusive errors. The aggregateTwoErrors()
function already handles that case but it might make sense to use an assertion instead to guarantee that they are indeed exclusive.
Others might be direct causes of former errors and in those cases it's probably best to use the new JS error cause
option.
Due to that I suggest to handle each case individually per PR or commit.
No description provided.