Errors

When a request fails, the API says why in a problem details object (RFC 9457), sent as application/problem+json. Its type is stable and safe to branch on; title and detail are written for people and may change.

The problem model

A validation failure

{
  "type": "/problems/validation",
  "title": "The request has invalid fields",
  "status": 422,
  "detail": "2 fields are invalid",
  "instance": "req_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "errors": [
    {
      "pointer": "/name",
      "reason": "too_long",
      "detail": "must be at most 128 characters"
    },
    {
      "pointer": "/time_zone",
      "reason": "invalid",
      "detail": "isn't an IANA time zone"
    }
  ]
}
  • Name
    type
    Type
    string
    Description

    What kind of problem it is, such as /problems/validation. Stable.

  • Name
    title
    Type
    string
    Description

    A short summary of the kind of problem, for people.

  • Name
    status
    Type
    integer
    Description

    The HTTP status code.

  • Name
    detail
    Type
    string
    Description

    What went wrong in this case, for people.

  • Name
    instance
    Type
    string
    Description

    The request's ID. Quote it when you ask for help.

  • Name
    errors
    Type
    array of objects
    Description

    For validation failures: every rejected field, with a JSON Pointer (RFC 6901) to it in the request body, a machine-readable reason, and a detail for people. At most 100; when there were more, detail says how many.

Status codes

StatusMeans
400The request couldn't be read: malformed JSON, a bad query parameter, or an If-Match that names no entity tag.
401The access token is missing, expired or revoked. Get a new one.
403The token doesn't have the scope this needs. WWW-Authenticate says which error.
404There's no such resource.
409It conflicts with how things are now. See the problem types below.
412The resource changed since you read it. Get it again, then retry with the new etag.
422Some fields are invalid, or an Idempotency-Key was reused for a different request.
428If-Match is required here.
429Too many requests. Wait for Retry-After, then send it again.
5xxSomething went wrong on Passway's side. Retry with backoff, using the same Idempotency-Key.

Problem types

  • Name
    /problems/validation
    Type
    422
    Description

    Fields are invalid. errors lists each one, so you can show the problem next to the field.

  • Name
    /problems/bad-request
    Type
    400
    Description

    The request couldn't be read at all.

  • Name
    /problems/conflict
    Type
    409
    Description

    It clashes with something that exists, such as a name that must be unique.

  • Name
    /problems/has-dependents
    Type
    409
    Description

    Other resources still depend on this one, such as access points through a door you're deleting. Remove or move them first.

  • Name
    /problems/wrong-writer
    Type
    409
    Description

    Another source manages these fields, such as a person your identity provider sends over SCIM. Change them there. See Directory sync.

  • Name
    /problems/idempotency-key-in-progress
    Type
    409
    Description

    A request with this Idempotency-Key is still running. Send it again after Retry-After. See Safe retries.

New problem types may appear. Fall back on the status code for any type you don't know.