MCPcopy Create free account
hub / github.com/instantdb/instant / onStartSyncError

Method onStartSyncError

client/packages/core/src/SyncTable.ts:879–902  ·  view source on GitHub ↗
(msg: {
    op: 'error';
    'original-event': StartMsg;
    'client-event-id': string;
    status: number;
    type: string;
    message?: string;
    hint?: any;
  })

Source from the content-addressed store, hash-verified

877 }
878
879 public onStartSyncError(msg: {
880 op: 'error';
881 'original-event': StartMsg;
882 'client-event-id': string;
883 status: number;
884 type: string;
885 message?: string;
886 hint?: any;
887 }) {
888 const hash = weakHash(msg['original-event']['q']);
889 const error = {
890 message: msg.message || 'Uh-oh, something went wrong. Ping Joe & Stopa.',
891 status: msg.status,
892 type: msg.type,
893 hint: msg.hint,
894 };
895
896 const k = Object.keys(msg['original-event']['q'])[0];
897 this.notifyCbs(hash, {
898 type: CallbackEventType.Error,
899 data: { [k]: [] },
900 error,
901 });
902 }
903
904 public onResyncError(msg: {
905 op: 'error';

Callers 1

_handleReceiveErrorMethod · 0.80

Calls 2

notifyCbsMethod · 0.95
weakHashFunction · 0.85

Tested by

no test coverage detected