# Errors & retries

Handle failures and retries safely.

> **Proposed public API.** The direct submission contract is a design proposal. Its examples are illustrative.

## Current error format

```json
{
  "error": "invalid_request",
  "issues": [
    {
      "path": [
        "body"
      ],
      "code": "invalid_json"
    }
  ]
}
```

## Current error reference

| HTTP | Error | Meaning |
| --- | --- | --- |
| 400 | invalid_request | Invalid payload |
| 401 | customer_credentials_required | Invalid credential |
| 403 | customer_inactive | Disabled account |
| 413 | payload_too_large | Body exceeds limit |
| 422 | run_limit_exceeded | Run-size limit |
| 429 | quota_exceeded | Account quota exceeded |
| 500 | internal_server_error | Unexpected failure |

These codes are from the supplied current implementation; verify mapping for the new contract.

## Retries

Do not blindly retry creation or solve submission after a lost response. Define an explicit idempotency and recovery contract before publication.
