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

# Errors

> Understanding errors in the Deck API.

## System Level Errors

When the Deck platform encounters an error, it returns a system level error response:

```json theme={null}
{
  "job_guid": "67901dec-aea2-451d-abee-b44be31ae043",
  "error": {
    "error_code": "SystemError",
    "error_message": "Something went wrong"
  },
  "webhook_type": "Job",
  "webhook_code": "JobName",
  "environment": "Production"
}
```

### Example Errors

| Error Code       | Description                                                                                                                       |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `ActionRejected` | The requested action was rejected by the system or source.                                                                        |
| `Blocked`        | The operation was blocked due to security policies or rate limiting.                                                              |
| `InputValues`    | The input values provided are invalid or missing required fields.                                                                 |
| `JobCanceled`    | The job was canceled before it completed. Most often occurs when you call the `CloseConnection` job while another job is running. |
| `NotFound`       | The requested resource, endpoint, or entity could not be found.                                                                   |
| `Timeout`        | The operation took longer than the allowed time and timed out.                                                                    |
| `SystemError`    | A system-level error occurred on the Deck platform.                                                                               |
| `Unexpected`     | An unexpected error occurred that does not fit into other error categories.                                                       |

## Connection Errors

When there are issues with user authentication or connection establishment, errors are returned in the style of a system error:

```json theme={null}
{
  "job_guid": "67901dec-aea2-451d-abee-b44be31ae043",
  "error": {
    "error_code": "InvalidCredentials",
    "error_message": "The credentials are invalid."
  },
  "webhook_type": "Job",
  "webhook_code": "EnsureConnection",
  "environment": "Production"
}
```

### Example Errors

| Error Code           | Description                                                                                                          |
| -------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `AuthMethodInvalid`  | The specified authentication method is not supported or is invalid for this source.                                  |
| `InputValues`        | The provided input values are invalid or missing required fields.                                                    |
| `InvalidCredentials` | The authentication credentials provided are incorrect.                                                               |
| `ValidationFailed`   | Validation on one or more input parameters was unsuccessful.                                                         |
| `MfaCodeInvalid`     | The Multi-Factor Authentication code entered is incorrect or has expired.                                            |
| `MfaTimeout`         | The Multi-Factor Authentication process timed out before the user provided a response.                               |
| `SourceError`        | The connection could not be completed due to an error, restriction, or unexpected behavior from the external source. |
| `SystemError`        | An unexpected system error occurred during the connection attempt.                                                   |
| `Timeout`            | The authentication process took longer than the allowed time and timed out.                                          |

## Job Execution Errors

When a job completes but encounters an error during execution, the error information is included in the job's output. The `success` field on a job's output also lets you know if the job completed tasks as expected.

```json theme={null}
{
  "job_guid": "67901dec-aea2-451d-abee-b44be31ae043",
  "output": {
    "success": false,
    "error_category": "JobFailed",
    "message": "Failed to complete JobName."
  },
  "webhook_type": "Job",
  "webhook_code": "JobName",
  "environment": "Production"
}
```

### Example Errors

| Error Code          | Description                                                                                                   |
| ------------------- | ------------------------------------------------------------------------------------------------------------- |
| `AccountNotFound`   | The specified account could not be located or does not exist.                                                 |
| `JobFailed`         | The job execution failed due to an agent error or unexpected condition.                                       |
| `JobNotSupported`   | The requested job type is not supported for this source or connection.                                        |
| `JobOutcomeUnknown` | The outcome of the job execution is inconclusive.                                                             |
| `InputInvalid`      | The input provided for the job is invalid, incomplete, or does not match the expected schema.                 |
| `ResourceNotFound`  | The specified resource required for the job could not be found.                                               |
| `ResourceNotReady`  | The resource required for the job is not ready or available at this time.                                     |
| `SourceError`       | The job could not be completed due to an error, restriction, or unexpected behavior from the external source. |
