# ErrorState 📌

Display an error message. Used by UIs when an exception is caught, and an error message needs to be displayed. If in development mode, the actual error is displayed, otherwise displays a generic message in production mode.

{% hint style="info" %}

#### System Component 📌

This component is shipped with BlueBase Core.
{% endhint %}

## Usage

```jsx
import { ErrorState } from '@bluebase/core';

// Then somewhere in your app:
<ErrorState retry={retryCallback} error={Error('Bang!')} />
```

## Properties

| prop   | type     | required | default | description                                             |
| ------ | -------- | -------- | ------- | ------------------------------------------------------- |
| error  | Error    | *no*     | -       | The error to display                                    |
| retry  | Function | *no*     | -       | Callback function, called when retry button is pressed. |
| testID | string   | *no*     | -       | Used to locate this view in end-to-end tests.           |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bluebase.gitbook.io/core/components/errorstate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
