Skip to content

lib: http server, friendly error messages

lib: improved error message description for the http server binding errors.

currently changed only in setupListenHandle function, 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.

example: old error message: listen EADDRINUSE new error message: listen EADDRINUSE: Address already in use

adjust tests to the new error.

Issue: https://github.com/nodejs/node/issues/22936

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading