mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
Report chat errors to telemetry (#105)
This commit is contained in:
parent
8ea104c6cc
commit
cb417d8384
@ -474,6 +474,7 @@ export const ChatImpl = memo((props: ChatProps) => {
|
|||||||
onStatus: onChatStatus,
|
onStatus: onChatStatus,
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
toast.error('Error resuming chat');
|
||||||
console.error('Error resuming chat', e);
|
console.error('Error resuming chat', e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { pingTelemetry } from '../hooks/pingTelemetry';
|
||||||
import { createInjectableFunction } from './injectable';
|
import { createInjectableFunction } from './injectable';
|
||||||
|
|
||||||
const replayWsServer = 'wss://dispatch.replay.io';
|
const replayWsServer = 'wss://dispatch.replay.io';
|
||||||
@ -181,6 +182,7 @@ export class ProtocolClient {
|
|||||||
if (result) {
|
if (result) {
|
||||||
info.deferred.resolve(result);
|
info.deferred.resolve(result);
|
||||||
} else if (error) {
|
} else if (error) {
|
||||||
|
pingTelemetry('ProtocolError', { method: info.method, error });
|
||||||
console.error('ProtocolError', info.method, id, error);
|
console.error('ProtocolError', info.method, id, error);
|
||||||
info.deferred.reject(new ProtocolError(error));
|
info.deferred.reject(new ProtocolError(error));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user