diff --git a/src/strategies/websocket.ts b/src/strategies/websocket.ts index 4860ceb2..e3f200e4 100644 --- a/src/strategies/websocket.ts +++ b/src/strategies/websocket.ts @@ -449,9 +449,11 @@ export class WebSocketStrategy implements Connection { method: string, params?: unknown[], ) { - return new Promise((resolve) => { + return new Promise((resolve, reject) => { if (!this.socket) throw new NoActiveSocket(); - this.socket.send(method, params ?? [], (r) => resolve(r as U)); + this.socket + .send(method, params ?? [], (r) => resolve(r as U)) + .catch((e) => reject(e)); }); }