Error Responses

Ordinary REST handlers, UUID validation and router-generated 404/405 responses use the same structured JSON envelope with a machine-parseable error code. Older releases can return a string in error on some paths. SCIM uses its own error format; reverse-proxy and transport failures can be non-JSON. Check the HTTP status and content type before parsing:

{
  "error": {
    "code": "NOT_FOUND",
    "message": "device not found"
  }
}

The field property is only present for validation errors and identifies the specific input field that failed validation.