Improving error messages description
lib: improved error message description for the http server binding errors.
changed in setupListenHandle
, but needs to be change all over.
Added new uvExceptionWithHostPort
function (+export) in lib/internal/error.js
that extracts the error message defined by libuv, using the error code, and returns an error object with the full error description: 'address already in use' for example.
Removed exportable function _exceptionWithHostPort
from lib/util.js
- exported by accident
Replaced exceptionWithHostPort
to the new function uvExceptionWithHostPort
for a more detailed error.
Fixes: https://github.com/nodejs/node/issues/22936
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines