PlanDocket

Error Handling

How the API communicates errors and how to handle them.

HTTP Status Codes

Code Description
200 Request successful
201 Resource successfully created
204 Success, no content returned (e.g. on DELETE)
400 Bad request
401 Not authenticated
403 No permission
404 Resource not found
405 HTTP method not allowed
422 Validation error
429 Request limit exceeded
500 Internal server error

Error Format

// Validation error (422)
{
  "error": "Validation failed",
  "errors": {
    "email": ["The email field is required."],
    "name": ["The name must be at least 2 characters."]
  }
}

// Bad request (400, 401, 403, 404, 429, 500)
{
  "error": "Resource not found"
}
Esc to close