-
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
dgram: append actual errors to ERR_SOCKET_CANNOT_SEND #27865
Conversation
This commit appends the actual error to the emitted `ERR_SOCKET_CANNOT_SEND` error so that we could know the detailed reason why the `send()` operation failed.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/cc @nodejs/dgram Someone might help to take a look. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
// Append `causedByError` to the `error`. | ||
function addCausedByError(error, message, causedByError) { | ||
let msg = message; | ||
if (causedByError) { |
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 might actually make sense to remove this if
statement. If the cause is e.g., a thrown undefined
or false
, so be it.
@oyyd sorry that it took so long for someone to look at this again. This needs a rebase by now but otherwise this seems good to go. |
Did #31958 handle this issue (differently) and this can/should now be closed? |
Yes, it looks like #31958 has fixed this gracefully. I'm closing this PR. |
One of our apps has used up all available ports because of misuse and we have noticed some
ERR_SOCKET_CANNOT_SEND
errors in our logs indicating this. I think appending the actual errors to theERR_SOCKET_CANNOT_SEND
error would help with diagnosing.This commit appends the actual error to the emitted
ERR_SOCKET_CANNOT_SEND
error so that we could know the detailed reason why the
send()
operationfailed.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes