Errors
Error codes of the Database API.
Errors use the shared envelope: { "success": false, "error": "...", "code": "..." }.
| Status | code | When |
|---|---|---|
400 | CONFIRMATION_REQUIRED | Deleting without the right confirm value |
400 | SQL_ERROR | Postgres rejected the statement, or several statements were sent; error has the message |
400 | PLAN_NOT_AVAILABLE | The free plan can't be bought, or the plan is not for sale |
400 | INVALID_IDEMPOTENCY_KEY | The Idempotency-Key header has the wrong format |
400 | INVALID_REQUEST / REQUEST_ERROR | Another business rule, error explains |
401 | NO_API_KEY, INVALID_API_KEY, API_KEY_EXPIRED | Authentication failed |
402 | INSUFFICIENT_BALANCE | The wallet can't pay for the plan |
402 | DATABASE_LIMIT | The account already has 20 databases |
403 | SCOPE_NOT_ALLOWED | The key was not given the Database API |
403 | PLAN_REQUIRED | Compute settings need a paid plan |
404 | DATABASE_NOT_FOUND, PROJECT_NOT_FOUND, ENVIRONMENT_NOT_FOUND, PLAN_NOT_FOUND | Doesn't exist, or the key can't reach it |
409 | ENVIRONMENT_BRANCH_MISSING | The environment has no branch yet, see Branches |
409 | REQUEST_IN_PROGRESS | A request with the same Idempotency-Key is still running |
422 | PLAN_LIMIT | maxCu is above what the plan allows |
422 | VALIDATION_ERROR | The body or query does not match the schema; error names the field |
428 | WRITE_NOT_ALLOWED | The statement changes data; send allowWrite: true |
429 | RATE_LIMITED | Too many requests, see Retry-After |
502 | DATABASE_PROVIDER_ERROR | The database service could not complete the request. Retry later |
500 | INTERNAL_ERROR | Something went wrong on our side. Retry later |