Skip to main content
Errors are always returned as an array, regardless of how many occurred, so your error handling logic only needs one code path.

Error structure

Handling errors

Use type and code for branching logic. The message field is for logging and display only. It may change.

Error types

Errors are grouped as Deck Errors, Request Errors, or Source Errors. Only Deck Errors count against a task’s success rate.

Success rate

Success rate is the share of task runs that completed successfully over a given time period. Only Deck Errors count against it.
  • Runs that succeed count as successes.
  • Runs that fail with a Deck Error count as failures.
  • Runs that fail with a Request Error or Source Error are excluded from the calculation, since it was impossible for Deck to complete the task.

Error codes by type

api

idempotency

session

rate_limit

source

request

These are the most common errors. They indicate a problem with your request.

auth

interaction

task

storage

organization

Errors on resource objects

When a task run fails, the errors array is populated on the run object itself. This is the same structure as API-level errors.

Request IDs

Every response includes a request_id. When contacting Deck support, include this value to speed up troubleshooting.