Skip to content

Commit 92c221f

Browse files
committed
fix: add logging for WebSocket errors
This helps debug WebSocket connection issues by logging error events. The close event will still follow, but now we can see the initial error. Refs #765
1 parent e3d46b6 commit 92c221f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apps/web/src/wsTransport.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ export class WsTransport {
186186
this.scheduleReconnect();
187187
});
188188

189-
ws.addEventListener("error", () => {
190-
// close will follow
189+
ws.addEventListener("error", (event) => {
190+
// Log WebSocket errors for debugging (close event will follow)
191+
console.warn("WebSocket connection error", { type: event.type, url: this.url });
191192
});
192-
}
193193

194194
private handleMessage(raw: unknown) {
195195
const result = decodeWsResponse(raw);

0 commit comments

Comments
 (0)