@tthr/vue 0.0.75 → 0.0.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -306,8 +306,13 @@ async function connect(config: { url: string; projectId: string; apiKey: string;
306
306
  };
307
307
 
308
308
  ws.onerror = (error: Event | Error) => {
309
- const err = error instanceof Error ? error : new Error('WebSocket error');
310
- log.error('WebSocket error:', err.message);
309
+ // WebSocket error events often don't contain useful details
310
+ // The actual error is usually surfaced via onclose
311
+ if (error instanceof Error && error.message) {
312
+ log.error('WebSocket error:', error.message);
313
+ } else {
314
+ log.debug('WebSocket connection error (details in close event)');
315
+ }
311
316
  };
312
317
 
313
318
  ws.onclose = (event: { code?: number; reason?: string }) => {
@@ -317,7 +322,7 @@ async function connect(config: { url: string; projectId: string; apiKey: string;
317
322
  handleReconnect(config);
318
323
  };
319
324
  } catch (error) {
320
- log.error('Failed to connect:', error);
325
+ log.debug('Failed to connect:', error);
321
326
  handleReconnect(config);
322
327
  }
323
328
  }
@@ -334,7 +339,7 @@ function handleReconnect(config: { url: string; projectId: string; apiKey: strin
334
339
  const delay = Math.min(RECONNECT_DELAY * Math.pow(2, reconnectAttempts - 1), 30000);
335
340
 
336
341
  setTimeout(() => {
337
- connect(config).catch((err) => log.error('Reconnect failed:', err));
342
+ connect(config).catch((err) => log.debug('Reconnect failed:', err));
338
343
  }, delay);
339
344
  }
340
345
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tthr/vue",
3
- "version": "0.0.75",
3
+ "version": "0.0.76",
4
4
  "description": "Tether Vue/Nuxt SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",