ArenaErrorState.prompt.md

August 16, 2026 ยท View on GitHub

Arena failure state, something did not load, and there is a way to try again. Under the API contract (contracts/api/components/ArenaErrorState.json) Arena draws the primary retry itself, from retryLabel/retry, the same drawn-from-data shape ArenaAlert's actionLabel/action uses, rather than leaving it to a consumer to project. The [secondaryAction] slot stays projected, for whatever a consumer wants beside the retry (a link to logs, say). The solid --error fill is what distinguishes it from arena-empty-state's dashed neutral border: one apologises and offers a retry, the other simply has nothing yet. code renders the support code as a mono chip: it is for a support conversation, not for the user to act on, which is why it is muted and small. The actions wrapper only renders when a retry or a secondary action actually exists, a bare error state ships no dead space for a retry it does not offer.

<arena-error-state icon="ph-bold ph-plugs"
                   title="Couldn't reach the delivery API"
                   message="The dashboard is showing the last data it cached."
                   code="ERR_UPSTREAM_504"
                   [retryLabel]="'Retry'"
                   (retry)="retry()">
  <a secondaryAction href="/logs">View logs</a>
</arena-error-state>

Members, in contract order and under this layer's own names. * marks a required one.

MemberFormTypeDefaultWhat it is
iconprimitivestringA Phosphor class name for the danger glyph Arena draws.
titleprimitivestring"Something went wrong"The headline: what failed.
headingLevelenumArenaHeadingLevel"h3"Which rung of the document outline the title takes. Only the element changes: the title's class is the same at every value, so the render is identical and no appearance follows from it. It defaults to h3, the card rung of the title ladder, for the reason an empty state does: a failure fills the body of a region something above it already names. none takes the headline out of the outline, which is what a failure inside a small surface wants, and it is available here because title carries a default rather than being required.
messageprimitivestringA sentence of detail under the title.
codeprimitivestringA diagnostic/support code, shown monospaced.
retryLabelprimitivestringThe label of the retry button Arena draws. Absent renders no retry.
retryeventThe retry button was activated.
secondaryActionslotAn extra control beside the retry (e.g. a link to logs).

Import ArenaSecondaryAction from @dravensoft/arena-angular alongside ArenaErrorState in the host component's imports, secondaryAction is a directive, not a plain attribute, because it is how the error state detects that a secondary action was projected at all.

Do / Don't

  • Always pass retryLabel when a retry could work. An error state with no retry is a dead end the user has to navigate out of.
  • Say what still works, if anything does: "showing the last cached data" is more useful than "an error occurred".
  • Don't put the raw exception in message. The code chip is where a machine-readable detail goes; the message is for a person.
  • Don't use this for a validation failure on a field: that belongs on the field.
  • Don't forget to import ArenaSecondaryAction when projecting a secondary action, without it, the secondaryAction attribute is inert and the content silently fails to render.

The rules of the language hold in the code you write from this page, and no gate reads your application to enforce them. An Arena component is not a styling surface: put no class of your own on it, read every value through its token rather than a raw colour or a bare 16px, and never wrap it in your router's own link. The rest of the rules are in ../../../../../skills/design/SKILL.md.