diff --git a/price-service/src/ws.ts b/price-service/src/ws.ts index 4885bd91..e788f33e 100644 --- a/price-service/src/ws.ts +++ b/price-service/src/ws.ts @@ -233,6 +233,10 @@ export class WebSocketAPI { this.aliveClients.add(ws); }); + ws.on("error", (err: Error) => { + logger.warn(`Err with client ${this.wsId.get(ws)}: ${err}`); + }); + ws.on("close", (_code: number, _reason: Buffer) => { logger.info(`client ${this.wsId.get(ws)} closed the connection.`); this.promClient?.addWebSocketInteraction("close", "ok");