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

  • type links to a page about that kind of problem. See Problems.
  • code is the contract. Branch on it. It changes only with a deprecation.
  • type and status are the class of failure, for handling whole categories.
  • detail is a sentence for a person and may be reworded at any time.
  • retryable says whether the same request could succeed if sent again later.
  • resource names the missing thing on not_found and job_name_taken.
  • issues lists every field that is wrong on validation_failed, each with a field, a code (required, too_long, out_of_range or invalid) and a message.

Codes

CodeStatusRetryableWhen
already_exists409noSomething with that identity already exists
conflict409noThe request clashes with the current state
forbidden403noThe caller may not do this
internal500noSomething went wrong on our side
invalid_request400noThe request is malformed: a bad id, cursor, limit or JSON body
job_limit_reached403noThe project already holds as many jobs as it can; delete some to add more
job_name_taken409noAnother job in the project has that name, ignoring case
method_not_allowed405noThe route exists but not for that method; see Allow
not_found404noThe route, project, job or run does not exist
payload_too_large413noThe body is over 1 MB
run_in_progress409noThe job already has a run that has not finished
unauthenticated401noThe bearer token is missing or not one we accept
unavailable503yesSomething the request depends on is not available right now
unsupported_media_type415noThe body is not application/json
validation_failed422noFields are wrong; see issues

Last updated