MCPcopy
hub / github.com/aspen-cloud/triplit / onErrorHandler

Method onErrorHandler

packages/client/src/sync-engine.ts:1077–1086  ·  view source on GitHub ↗
(session: SyncSession)

Source from the content-addressed store, hash-verified

1075 }
1076
1077 private onErrorHandler(session: SyncSession) {
1078 return (evt: any) => {
1079 // WS errors are intentionally vague, so just log a message
1080 this.logger.error(
1081 'An error occurred during the connection to the server. Retrying connection...'
1082 );
1083 // on error, close the connection and attempt to reconnect
1084 this.closeConnection();
1085 };
1086 }
1087
1088 private lastKnownConnectionStatus: ConnectionStatus = 'UNINITIALIZED';
1089 private fireConnectionChangeHandlers(session: SyncSession | undefined) {

Callers 1

createConnectionMethod · 0.95

Calls 2

closeConnectionMethod · 0.95
errorMethod · 0.45

Tested by

no test coverage detected