Skip to main content

Class: SyncSchemaMismatchError

Defined in: packages/client/src/core/sync/index.ts:148

Raised when a remote is ahead of this device's data model.

Pulling from it would deliver documents shaped by patches this device has not applied; they would be stored verbatim (replication writes bypass validation, by design) and then fail to read back. Refusing early leaves the local stack intact and tells the application to ship the newer build.

Extends

  • Error

Constructors

Constructor

new SyncSchemaMismatchError(
stack,
localVersion,
remoteVersion,
scope): SyncSchemaMismatchError;

Defined in: packages/client/src/core/sync/index.ts:160

Parameters

ParameterTypeDefault value
stackstringundefined
localVersionstringundefined
remoteVersionstringundefined
scope"system" | "consumer""system"

Returns

SyncSchemaMismatchError

Overrides

Error.constructor

Properties

PropertyModifierTypeDefault valueDescriptionOverridesDefined in
localVersionreadonlystringundefinedThe schema version this device has applied, if any.-packages/client/src/core/sync/index.ts:153
namepublicstring"SyncSchemaMismatchError"-Error.namepackages/client/src/core/sync/index.ts:149
remoteVersionreadonlystringundefinedThe schema version the remote was last written with.-packages/client/src/core/sync/index.ts:155
scopereadonly"system" | "consumer"undefinedWhich half of the gate refused: the system schema, or the application's consumer patches.-packages/client/src/core/sync/index.ts:158
stackreadonlystringundefinedThe stack that refused to sync.Error.stackpackages/client/src/core/sync/index.ts:151