> ## 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.

# The Error object

When a request fails, the API returns an `error` object describing what went wrong. Use the object's fields to identify and handle the error.

```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"
  }
}
```

The response contains these attributes:

| Attribute       | Type     | Description                                                                                                                                                                                                                                          |
| :-------------- | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `error`         | `hash`   | Object describing the error that occurred.                                                                                                                                                                                                           |
| `error.code`    | `string` | Machine-readable code that identifies the error.                                                                                                                                                                                                     |
| `error.doc_url` | `string` | URL of the documentation associated with the error code.                                                                                                                                                                                             |
| `error.message` | `string` | Human-readable message with details about the error. The message can change for the same `code`, so do not use it programmatically.                                                                                                                  |
| `error.param`   | `string` | Name of the parameter associated with the error, or `null` if the error is not parameter-specific.                                                                                                                                                   |
| `error.type`    | `string` | Category of error. One of `api_error`, `authentication_error`, `link_error`, `institution_error`, `invalid_request_error`, `new_contact_error`, or `amount_error`. `new_contact_error` and `amount_error` apply only when you pre-validate payments. |
