Commit 82ea705
lib: http server, friendly error messages
Improved error message description for the http server binding errors.
Currently changed only 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.
example:
old error message: `listen EADDRINUSE`
new error message: `listen EADDRINUSE: Address already in use`
Removed exportable function `_exceptionWithHostPort` from
`lib/util.js` - exported by accident
Replaced `exceptionWithHostPort` to the new function
`uvExceptionWithHostPort` for a more detailed error.
Fixes: nodejs#22936
PR-URL: nodejs#22995
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 3f08c00 commit 82ea705
File tree
3 files changed
+52
-6
lines changed- lib
- internal
- test/parallel
3 files changed
+52
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
288 | 328 | | |
289 | 329 | | |
290 | 330 | | |
| |||
314 | 354 | | |
315 | 355 | | |
316 | 356 | | |
317 | | - | |
318 | | - | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
319 | 360 | | |
320 | 361 | | |
321 | 362 | | |
| |||
437 | 478 | | |
438 | 479 | | |
439 | 480 | | |
| 481 | + | |
440 | 482 | | |
441 | 483 | | |
442 | 484 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| |||
1266 | 1270 | | |
1267 | 1271 | | |
1268 | 1272 | | |
1269 | | - | |
| 1273 | + | |
1270 | 1274 | | |
1271 | 1275 | | |
1272 | 1276 | | |
| |||
1283 | 1287 | | |
1284 | 1288 | | |
1285 | 1289 | | |
1286 | | - | |
| 1290 | + | |
1287 | 1291 | | |
1288 | 1292 | | |
1289 | 1293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
0 commit comments