Skip to content

Commit a987b63

Browse files
committed
fix: add error logging for socket creation failures
1 parent 8827f21 commit a987b63

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

test/e2e/socket-options.test.mjs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@ import {
88
SocketOption
99
} from '../../index.mjs';
1010

11-
const SKIP_ERRORS = ['Operation not permitted', 'Protocol not supported'];
11+
// const SKIP_ERRORS = ['Operation not permitted', 'Protocol not supported'];
1212

1313
const tryCreateSocket = (options) => {
1414
try {
1515
return createSocket(options);
1616
} catch (err) {
17-
if (SKIP_ERRORS.includes(err.message)) {
18-
return null;
19-
}
2017
throw err;
2118
}
2219
};

test/e2e/socket.test.mjs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,11 @@ import { describe, it, afterEach } from 'node:test';
22
import assert from 'node:assert';
33
import { createSocket, Protocol, AddressFamily } from '../../index.mjs';
44

5-
const SKIP_ERRORS = [
6-
'Operation not permitted',
7-
'Protocol not supported'
8-
];
95

106
const tryCreateSocket = (options) => {
117
try {
128
return createSocket(options);
139
} catch (err) {
14-
if (SKIP_ERRORS.includes(err.message)) {
15-
return null;
16-
}
1710
throw err;
1811
}
1912
};

0 commit comments

Comments
 (0)