Skip to content

Error states

Last updated: 2026-11-27T01:02:18-03:00 (UTC-3)

How the console shows failures: a field that will not validate, an action the server refused, a page that could not load, and a gateway that is down or stopped. Part of the design system.

Scope Where Example
One field Under the field, tied with aria-describedby “Enter a whole number between 0 and 100” (see Forms)
One action Next to the action that failed, or above the form’s buttons “Key could not be revoked: it is used by an active session”
One panel Inside the panel, in place of its content, with a retry “Could not load the breakdown. Retry”
The page A banner at the top of the content (.error-banner), with its action on the right “The server did not answer. Your filters are kept.”
The gateway The live status in the top bar and the system card in the rail “Gateway unavailable”, “Traffic stopped”

The rest of the page keeps working: one failed panel never blanks the page.

  • Text of an error uses a failure color: --color-danger-text for new components (checked at 4.5:1 on the page and on its tint).
  • Background of a banner uses --color-danger-low, with a quiet border of the indicator at 40% (--color-danger-a66), as the console’s .error-banner does.
  • Status is a word or a code in its status color with a mark whose shape differs, never a chip and never a color alone: --color-status-error with a square for a real failure (a 5xx, a failed run, a gateway that is unavailable or stopped), --color-status-warning with a triangle for the gateway refusing or limiting (a 429, a 403, something turned off, a gateway checking, draining or stale), --color-status-ok with a round dot for healthy, and --color-status-info with a ring for neutral states. See Color.
  • A refusal is not a failure. A 429 or a 403 is the gateway doing its job, so it is warm, not red. Red is kept for what is actually broken.
  • The semantic red (--color-danger: #f7a7aa in the dark theme, #a82a33 in the light) is reserved for failures, destructive actions and !panic. It is not used for emphasis.
  • Say what happened and what the reader can do, in that order: “Could not save the model. The alias already exists; choose another name.”
  • Show the server’s error code or message when it helps support (provider_auth_failed), never a stack trace, a token, a prompt or a provider key.
  • Keep the reader’s input: a failed save leaves the form filled.
  • Every request carries an X-Request-Id; when an error has one, show it so the reader can find the call in the request logs.
  • Not permitted: the server decides what a user may do, and the console hides actions the user cannot take. If an action is refused anyway (permissions changed), say “You no longer have access to this action” and refresh the view.
  • Feature off: a page for a capability that is turned off says which flag enables it and who can change it, instead of an error.
  • Service unavailable (503): say the gateway is unavailable and keep the last good data visible, marked as stale.
<div class="release-banner" role="alert">
<strong>Could not load usage.</strong>
The server did not answer within 30 seconds. Your filters are kept.
<button class="identity-button" type="button">Retry</button>
</div>
.release-banner {
border: 1px solid var(--color-danger-a66);
border-radius: var(--radius-field);
background: var(--color-danger-low);
color: var(--color-danger-text);
}

m7gtw[email protected]