Skip to content

Errors

The JSON shape of every pkgplane API error, including validation errors.

Updated

Every error from the pkgplane API is JSON with an error object:

{ "error": { "message": "API key not found" } }
Field Type Description
error.message string What went wrong, written for a person to read
error.issues array Only on 422: one entry per invalid field
error.issues[].path (string | number)[] Where the field is, such as ["name"] or ["items", 0]
error.issues[].message string What’s wrong with it

Match on the HTTP status code, not on message: messages can be reworded.

Validation errors

A request whose body, path or query doesn’t match the endpoint’s schema gets 422 Unprocessable Content and lists each problem:

{
  "error": {
    "message": "Validation failed",
    "issues": [{ "path": ["expiresInDays"], "message": "Too big: expected number to be <=365" }]
  }
}

Status codes

Status Meaning
401 Not authenticated. See Authentication
403 Authenticated, but not allowed
404 No such endpoint, or no such resource in your account
409 Conflicts with what exists, such as a 26th API key
422 Invalid request. See Validation errors
429 Rate limited. Retry after Retry-After seconds
500 A fault in pkgplane. The message is always Internal server error
503 From GET /api/health only: the database is unavailable

Type to search…

↑↓ navigate↵ selectEsc close