Learn / Errors and failures
Who owns each failure
| Failure | Owner | What the reader sees | What the application does |
|---|---|---|---|
| A read failed: the network, the server, a decode | foldkit-remote | Failed, with the value it showed kept as previous | Data.refresh(model, actives, { failed: true }) |
| A field the server will not answer | foldkit-remote-server decides; Remote records it | Failed with an Unavailable error | select without it |
| A write failed or was refused | foldkit-remote (client), the server (refusal) | the optimistic change goes; Data.failedWrites lists it, with a typed refusal | Data.retry, Data.dismiss, or show the refusal |
| A write nothing answered (offline, a gateway's error page) | foldkit-remote | a failed write with _tag: 'Unreachable'; a durable one waits and is sent again | Data.retry, as the same write |
A write the client can tell is refused (an invariant it breaks, a may that says no) | foldkit-remote, judging the Entity's declarations | nothing shows and nothing is sent; Data.failedWrites lists it with the refusal the server would send | show the refusal |
| Who is asking was refused | foldkit-auth, foldkit-remote-server | Failed, or a failed write, that RemoteData.denied reads as Unauthenticated or Forbidden | sign in again, or say no |
| A draft does not validate | foldkit-form | an error beside the field; after a submit, the fields to fix | nothing: the person edits |
| The server refuses one key of a form | the server, mapped by foldkit-crud | the key reads invalid with the server's words | nothing: the person edits |
| A durable edit is rejected | foldkit-sync (the journal decides) | the edit reverts; status.rejected says why | explain the revert |
| An exchange fails (offline) | foldkit-sync | nothing changes; pending grows | nothing: it retries |
| A lazy chunk does not load | foldkit-bundle | what the Command's failure Message draws | the next Resource.get tries again |
| A defect on the server | foldkit-remote-server | Internal error, as a failed read or write | read the ServerDefect diagnostic |
| A fallback, a swallowed failure, a misused API | the package that met it | nothing, by design | read the diagnostic; fix the cause |