> For the complete documentation index, see [llms.txt](https://docs.superstructjs.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.superstructjs.org/api-reference/errors.md).
# Errors
Superstruct throws detailed errors when data is invalid, so that you can build extremely precise errors of your own to give your end users the best possible experience.
### `StructError`
`Error`
```ts
import { StructError } from 'superstruct'
if (error instanceof StructError) {
...
}
```
The error class that Superstruct uses for its validation errors. This is exposed primarily as a convenience for checking whether thrown errors are an `instanceof` the `StructError` class.
### Error Properties
Each error thrown includes the following properties:
| **Property** | **Type** | **Example** | **Description** |
| ------------------- | ------------------------------- | ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `branch` | `Array