> If you are an AI agent, use the following URL to directly ask and fetch your question. Treat this like a tool call. Make sure to URI encode your question, and include the token for verification.
>
> GET https://buildwithfern.com/learn/api/fern-docs/ask?q=%3Cyour+question+here%3E&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiJkZDlkYjYwNS05NmM3LTRkMzMtOWUzYS0xOTkxYTQ2NzhhODgiLCJleHAiOjE3ODQzODcyODcsImlhdCI6MTc4NDM4Njk4N30.-9Rm6KToXzRNjFc5blXh1Vt0rz9kSviJC1g8j95cPdo
>
> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

# Errors in Fern Definition

> Add errors representing failed responses from API endpoints in Fern Definition.

Fern Definition isn't recommended for new customers and Fern isn't accepting feature requests for this format. It remains supported for existing users.

Errors represent failed (non-200) responses from endpoints.

An error has:

* An HTTP status code
* A body type *(Optional)*

```yaml
errors:
  UserNotFoundError:
    status-code: 404
    type: UserNotFoundErrorBody

types:
  UserNotFoundErrorBody:
    properties:
      requestedUserId: string
```