Skip to content

Type Alias: SyncServerError

SyncServerError = { kind: "mutation-error"; clientGroupID: string; clientID: string; mutationID: number; mutationName: string; cause: unknown; } | { kind: "onPushed-failed"; clientGroupID: string; clientID: string; cause: unknown; } | { kind: "protocol-mismatch"; expected: number; got: number; } | { kind: "schema-mismatch"; expected: string; got: string; } | { kind: "unauthorized"; } | { kind: "invalid-request"; reason: string; } | { kind: "blob-invalid-request"; reason: string; } | { kind: "blob-not-found"; hash: string; } | { kind: "blob-read-auth-cap-hit"; hash: string; cap: number; } | { kind: "blob-hash-mismatch"; hash: string; reason: string; } | { kind: "blob-upload-failed-server"; hash: string; cause: unknown; }

Defined in: server/src/sync-handler.ts:60

Server-side sync events. Emit through SyncHandlerOptions.onError to observability sinks (Sentry, structured logs, custom telemetry). The discriminated kind lets callers dispatch by class without stringly-typed regex on error messages.

{ kind: "mutation-error"; clientGroupID: string; clientID: string; mutationID: number; mutationName: string; cause: unknown; }


{ kind: "onPushed-failed"; clientGroupID: string; clientID: string; cause: unknown; }


{ kind: "protocol-mismatch"; expected: number; got: number; }


{ kind: "schema-mismatch"; expected: string; got: string; }


{ kind: "unauthorized"; }


{ kind: "invalid-request"; reason: string; }


{ kind: "blob-invalid-request"; reason: string; }


{ kind: "blob-not-found"; hash: string; }


{ kind: "blob-read-auth-cap-hit"; hash: string; cap: number; }

readonly kind: "blob-read-auth-cap-hit"

Fired when assertCanReadBlob walked the whole readAuthMaxRefs window without finding a readable owner and the window was fully saturated (refs.length === cap). Signals that the reverse-lookup cap is starting to matter in production — dashboard this to know when a shared asset needs a higher readAuthMaxRefs for exhaustive lookup.

readonly hash: string

readonly cap: number


{ kind: "blob-hash-mismatch"; hash: string; reason: string; }


{ kind: "blob-upload-failed-server"; hash: string; cause: unknown; }