Skip to content

Commit b6eba33

Browse files
authored
fix: add logging for WebSocket errors (pingdotgg#948)
Co-authored-by: hobostay <[email protected]>
1 parent 74c2262 commit b6eba33

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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)