> For the complete documentation index, see [llms.txt](https://bluebase.gitbook.io/core/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bluebase.gitbook.io/core/components/observers/errorobserver.md).

# ErrorObserver 📌

Observes any exceptions in child tree hierarchy. When an exception is caught, displays an Error state to gracefully handle it on the frontend.

{% hint style="info" %}

#### System Component 📌

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

## Usage

```jsx
<ErrorObserver>
 <Text>Rendered if there is no error here</Text>
</ErrorObserver>
```

## Properties

| prop           | type                           | required | default | description                                            |
| -------------- | ------------------------------ | -------- | ------- | ------------------------------------------------------ |
| error          | Error                          | *no*     | -       | If an error is passed as a prop, shows an error state. |
| checkError     | (props) => Error               | *no*     | -       | A function to check error based on props.              |
| errorComponent | Component                      | *no*     | -       | Component to show the error state.                     |
| children       | ReactNode \| (() => ReactNode) | *no*     | -       | Children are rendered when there are no error.         |
| testID         | string                         | *no*     | -       | Used to locate this view in end-to-end tests.          |
