Docs / ErrorState

ErrorState

An error message with an accessible retry action.

Install

npx shadcn@latest add https://crate.onerollstudios.com/r/error.json

Playground

The connection dropped before the answer finished.

Callbacks (onRetry) are logged here when the component calls them.

<ErrorState
  message="The connection dropped before the answer finished."
  onRetry={() => {}}
/>

Import

import { ErrorState } from "@/components/agent-wait-states/error-state";

Props

PropTypeRequiredDefaultNotes
classNamestringno
accentbooleanno
labelsPartial<CrateLabels>noReplace any of this component's labels. Overrides CrateProvider.
messagestringno
onRetry(() => void)no

Labels

Override with the labels prop or a CrateProvider.

LabelEnglish default
error"Something went wrong."
retry"Retry"

Example

<ErrorState message={error.message} onRetry={retry} />

For coding agents: /llms/error.md, generated from the same source.