# Error
URL: /docs/primitives/error
Accessible error display for messages with automatic error text extraction.
The Error primitive renders error states on messages using an accessible `role="alert"` container with automatic error text extraction. `Root` always renders its container; `Message` only renders when the message has an error. Wrap in `MessagePrimitive.Error` if you need the entire block to be conditional.
Error