Learn / Errors and failures
Sync failures and rejected edits
Because Sync stores user intent locally before talking to a server, its failure states differ from Remote mutations (see When things go wrong):
- Offline mode: Local edits keep saving to the outbox while
status.pendingcounts up and exchanges retry with backoff. Failed exchanges setstatus.lastErrorand emitExchangeFailed. - Rejected operations: When the server rejects an operation, the replica removes it from the outbox, replays remaining edits, and appends the rejection to
status.rejected.authorizedenials produceForbidden;validateerrors or reducer failures produceInvalid(Not a valid operation) without leaking server exception messages. - Storage write failure: If persisting to local storage fails, the edit reverts and
onPersistenceFailurereturns the fallbackModel. - Outbox durability: Unsynced operations live only in browser storage; clearing local storage discards unsent work.