Request Group

Invalid Content

{
  "error": {
    "type": "request",
    "code": "invalid_content",
    "message": "Failed to parse request data"
  },
  "_meta": null
}

Invalid Header

{
  "error": {
    "type": "request",
    "code": "invalid_header",
    "message": "Failed to validate request header"
  },
  "_meta": {
    "header_name": "Authorization"
  }
}

Invalid Data

{
  "error": {
    "type": "request",
    "code": "invalid_data",
    "message": "Failed validate request data"
  },
  "_meta": {
    "fields": [
      {
        "name": "short_name",
        "messages": ["Value is too long"]
      },
      {
        "name": "last_name",
        "messages": ["Required"] 
      }
    ] 
  }
}

Control Unauthorized

{
  "error": {
    "type": "request",
    "code": "control_unauthorized",
    "message": "User with specified access token does not exist"
  },
  "_meta": null
}

Resource Group

Not Found

{
  "error": {
    "type": "resource",
    "code": "not_found",
    "message": "Resource at the requested address was not found"
  },
  "_meta": null
}

Already Exists

{
  "error": {
    "type": "resource",
    "code": "already_exists",
    "message": "Resource already exists in the system"
  },
  "_meta": {
    "unique_key_fields": ["screen", "user"]
  }
}

Logical Group

Relation Not Found

{
  "error": {
    "type": "logical",
    "code": "relation_not_found",
    "message": "Could not find required related object"
  },
  "_meta": {
    "relation": "user"
  }
}

Internal Group

Storage Error

{
  "error": {
    "type": "internal",
    "code": "storage_error",
    "message": "Unexpected data storage behavior"
  },
  "_meta": null
}