Errors
The problem document every failed request returns, and every error code the Scheduler API uses.
The problem document
Every failure is an RFC 9457 problem document, sent as application/problem+json:
{
"type": "https://docs.digitospace.com/problems/conflict",
"title": "Conflict",
"status": 409,
"code": "run_in_progress",
"detail": "this job is already running; wait for it to finish, then run it again",
"instance": "/v1/projects/01k5ztq3jb9y2a1m9v2xw8e0ha/jobs/01m3c081d2wj4g63qcr53pa1yh/run",
"requestId": "01m3c081dbf3j55x7hsa7wc1yj",
"retryable": false
}Handle a failure
typelinks to a page about that kind of problem. See Problems.codeis the contract. Branch on it. It changes only with a deprecation.typeandstatusare the class of failure, for handling whole categories.detailis a sentence for a person and may be reworded at any time.retryablesays whether the same request could succeed if sent again later.resourcenames the missing thing onnot_foundandjob_name_taken.issueslists every field that is wrong onvalidation_failed, each with afield, acode(required,too_long,out_of_rangeorinvalid) and amessage.
Codes
| Code | Status | Retryable | When |
|---|---|---|---|
already_exists | 409 | no | Something with that identity already exists |
conflict | 409 | no | The request clashes with the current state |
forbidden | 403 | no | The caller may not do this |
internal | 500 | no | Something went wrong on our side |
invalid_request | 400 | no | The request is malformed: a bad id, cursor, limit or JSON body |
job_limit_reached | 403 | no | The project already holds as many jobs as it can; delete some to add more |
job_name_taken | 409 | no | Another job in the project has that name, ignoring case |
method_not_allowed | 405 | no | The route exists but not for that method; see Allow |
not_found | 404 | no | The route, project, job or run does not exist |
payload_too_large | 413 | no | The body is over 1 MB |
run_in_progress | 409 | no | The job already has a run that has not finished |
unauthenticated | 401 | no | The bearer token is missing or not one we accept |
unavailable | 503 | yes | Something the request depends on is not available right now |
unsupported_media_type | 415 | no | The body is not application/json |
validation_failed | 422 | no | Fields are wrong; see issues |
Last updated