GeezerVison is showing github.com — errors: fix ERR_SOCKET_BAD_PORT message · nodejs/node@d9d9d23
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: doc/api/errors.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1526,7 +1526,7 @@ An invalid (negative) size was passed for either the `recvBufferSize` or | 1526 | 1526 | <a id="ERR_SOCKET_BAD_PORT"></a> | 1527 | 1527 | ### ERR_SOCKET_BAD_PORT | 1528 | 1528 |
| 1529 | | -An API function expecting a port > 0 and < 65536 received an invalid value. | | 1529 | +An API function expecting a port >= 0 and < 65536 received an invalid value. | 1530 | 1530 |
| 1531 | 1531 | <a id="ERR_SOCKET_BAD_TYPE"></a> | 1532 | 1532 | ### ERR_SOCKET_BAD_TYPE | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/errors.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -808,7 +808,7 @@ E('ERR_SOCKET_ALREADY_BOUND', 'Socket is already bound', Error); | 808 | 808 | E('ERR_SOCKET_BAD_BUFFER_SIZE', | 809 | 809 | 'Buffer size must be a positive integer', TypeError); | 810 | 810 | E('ERR_SOCKET_BAD_PORT', | 811 | | - 'Port should be > 0 and < 65536. Received %s.', RangeError); | | 811 | + 'Port should be >= 0 and < 65536. Received %s.', RangeError); | 812 | 812 | E('ERR_SOCKET_BAD_TYPE', | 813 | 813 | 'Bad socket type specified. Valid types are: udp4, udp6', TypeError); | 814 | 814 | E('ERR_SOCKET_BUFFER_SIZE', | |
Collapse file Copy file name to clipboardExpand all lines: test/parallel/test-dns.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -290,7 +290,7 @@ const portErr = (port) => { | 290 | 290 | const err = { | 291 | 291 | code: 'ERR_SOCKET_BAD_PORT', | 292 | 292 | message: | 293 | | - `Port should be > 0 and < 65536. Received ${port}.`, | | 293 | + `Port should be >= 0 and < 65536. Received ${port}.`, | 294 | 294 | type: RangeError | 295 | 295 | }; | 296 | 296 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/parallel/test-internal-errors.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -129,7 +129,7 @@ assert.strictEqual(errors.getMessage('ERR_MISSING_ARGS', ['a', 'b', 'c']), | 129 | 129 | // Test ERR_SOCKET_BAD_PORT | 130 | 130 | assert.strictEqual( | 131 | 131 | errors.getMessage('ERR_SOCKET_BAD_PORT', [0]), | 132 | | - 'Port should be > 0 and < 65536. Received 0.'); | | 132 | + 'Port should be >= 0 and < 65536. Received 0.'); | 133 | 133 |
| 134 | 134 | // Test ERR_TLS_CERT_ALTNAME_INVALID | 135 | 135 | assert.strictEqual( | |
|