> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fintoc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Error object

When a request fails, the API returns an `error` object describing what went wrong.

```json theme={null}
{
  "error": {
    "code": "missing_parameter",
    "doc_url": "https://fintoc.com/docs#invalid-request-error",
    "message": "Missing required param: link_token",
    "param": "link_token",
    "type": "invalid_request_error"
  }
}
```

| Attribute       | Type     | Description                                                                                                                                                                                                                  |
| :-------------- | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `error`         | `hash`   | Object describing the error that occurred.                                                                                                                                                                                   |
| `error.code`    | `string` | The particular error that occurred. The API error codes follow the [standard HTTP error conventions for status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses).                      |
| `error.doc_url` | `string` | The URL of the documentation associated with the error code.                                                                                                                                                                 |
| `error.message` | `string` | Friendly message detailing the error. This field can change its text content for the same `code` value over time, so it shouldn't be used programmatically.                                                                  |
| `error.param`   | `string` | If the error is related to a parameter, this attribute indicates that parameter. It can be `null`.                                                                                                                           |
| `error.type`    | `string` | The type of the error. It may be `api_error`, `authentication_error`, `link_error`, `institution_error`, `invalid_request_error`, `new_contact_error` or `amount_error`. The last two are only if you pre-validate payments. |
