js-bao-wss-client / DocumentFormatMismatchEvent
Interface: DocumentFormatMismatchEvent
Payload of the document:format-mismatch event (client.on("document:format-mismatch", ...)).
Fired when the platform refuses a document because the format this client believed it had is not the format the platform resolved. The document is CLOSED when this arrives — its local rows and its unacknowledged writes are kept, nothing is evicted — because two of the three open shapes have no waiter to reject: a cached open sends its handshake from a microtask, and an already-open document re-syncs on reconnect. An open that WAS waiting on the network rejects with the same error as well.
Diagnose from declared and actual before doing anything: the server also logs Document format disagreement naming its own pinned format. Evicting the document clears this client's belief, which repairs a stale row and HIDES a mis-pinned document.
Properties
actual
actual:
1|2
What the platform resolved for the document.
declared
declared:
1|2
What this client believed, from its own local metadata row.
documentId
documentId:
string
error
error:
JsBaoError
The very error a waiting documents.open rejects with: code is DOCUMENT_FORMAT_MISMATCH and details carries documentId, declared and actual.