Learn / Errors and failures

How failures reach the screen vs. your logs

Every failure follows one of two paths:

  1. Actionable failures: A typed error arrives via Message, updates Model, and renders in the view with a retry, dismiss, edit, or sign-in control.
  2. Diagnostics: A package calls Diagnostics.report, delivering { _tag, source, level, message } to Diagnostics.Reporter in your Effect context while execution continues safely.

Three rules govern both paths:

  • Shown data stays on screen. A failed refresh retains its previous value and a list renders every row it can assemble. If an optimistic write left out a field needed by a view, the answer reports AnswerUnread and verifyPredictions emits a PredictionMismatch diagnostic (see Checking an answer against what was shown).
  • User actions retry on user command. Failed reads wait for Data.refresh and failed writes wait for Data.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.