Learn / Errors and failures
How failures reach the screen vs. your logs
Every failure follows one of two paths:
- Actionable failures: A typed error arrives via
Message, updatesModel, and renders in the view with a retry, dismiss, edit, or sign-in control. - Diagnostics: A package calls
Diagnostics.report, delivering{ _tag, source, level, message }toDiagnostics.Reporterin your Effect context while execution continues safely.
Three rules govern both paths:
- Shown data stays on screen. A failed refresh retains its
previousvalue and a list renders every row it can assemble. If an optimistic write left out a field needed by a view, the answer reportsAnswerUnreadandverifyPredictionsemits aPredictionMismatchdiagnostic (see Checking an answer against what was shown). - User actions retry on user command. Failed reads wait for
Data.refreshand failed writes wait forData.retry, while background transports (live streams, Sync exchanges, durable outboxes) handle transient drops automatically. - Diagnostics only observe. Reporting a diagnostic logs context for developers and keeps control flow identical whether a reporter is attached or quiet.