Skip to content

Commit cd59ae5

Browse files
authored
chore(dts-plugin): log error if the code is not ETIMEDOUT (#3203)
1 parent 85990e2 commit cd59ae5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/dts-plugin/src/server/DevServer.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,13 +318,15 @@ export class ModuleFederationDevServer {
318318
delete this._subscriberWebsocketMap[identifier];
319319
});
320320

321-
this._subscriberWebsocketMap[identifier].on('error', (event) => {
322-
if ('code' in event && event.code === 'ETIMEDOUT') {
321+
this._subscriberWebsocketMap[identifier].on('error', (err) => {
322+
if ('code' in err && err.code === 'ETIMEDOUT') {
323323
fileLog(
324324
`Can not connect ${JSON.stringify(remote)}, please make sure this remote is started locally.`,
325325
MF_SERVER_IDENTIFIER,
326326
'warn',
327327
);
328+
} else {
329+
console.error(err);
328330
}
329331
this._subscriberWebsocketMap[identifier]?.close();
330332
delete this._subscriberWebsocketMap[identifier];

0 commit comments

Comments
 (0)