{
  "x-apiture-version": "2.1.1",
  "title": "Error (v2.1.1)",
  "description": "Describes an error in an API request or in a service called via the API.\n\nThis schema was resolved from [`common/error`](https://static.api.apiture.com/schemas/common/error/v2.1.1/model.json).",
  "required": [
    "message"
  ],
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A localized message string describing the error condition."
    },
    "_id": {
      "description": "A unique identifier for this error instance. This may be used as a correlation ID with the root cause error (i.e. this ID may be logged at the source of the error). This is is an opaque string.",
      "readOnly": true,
      "type": "string"
    },
    "statusCode": {
      "description": "The HTTP status code associate with this error.",
      "type": "integer",
      "minimum": 100,
      "maximum": 599,
      "example": 422
    },
    "type": {
      "type": "string",
      "description": "An error identifier which indicates the category of error and associate it with API support documentation or which the UI tier can use to render an appropriate message or hint. This provides a finer level of granularity than the `statusCode`. For example, instead of just 400 Bad Request, the `type` may be much more specific. such as `integerValueNotInAllowedRange` or `numericValueExceedsMaximum` or `stringValueNotInAllowedSet`."
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "description": "An [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC time stamp indicating when the error occurred.",
      "allOf": [
        {
          "$ref": "https://static.api.apiture.com/schemas/common/readOnlyTimestamp/v1.0.0/model.json"
        }
      ],
      "example": "2018-02-02T03:37:15.375Z"
    },
    "attributes": {
      "description": "Informative values or constraints which describe the error. For example, for a value out of range error, the attributes may specify the `minimum` and `maximum` values. This allows clients to present error messages as they see fit (the API does not assume the client/presentation tier). The set of attributes varies by error `type`.",
      "allOf": [
        {
          "$ref": "https://static.api.apiture.com/schemas/common/attributes/v2.1.0/model.json"
        }
      ]
    },
    "remediation": {
      "type": "string",
      "description": "An optional localized string which provides hints for how the user or client can resolve the error."
    },
    "errors": {
      "description": "An optional array of nested error objects. This property is not always present.",
      "type": "array",
      "items": {
        "$ref": "https://static.api.apiture.com/schemas/common/error/v2.1.1/model.json"
      }
    },
    "_links": {
      "$ref": "https://static.api.apiture.com/schemas/common/links/v1.0.1/model.json"
    }
  },
  "example": {
    "_id": "2eae46e1575c0a7b0115a4b3",
    "message": "Descriptive error message...",
    "statusCode": 422,
    "type": "errorType1",
    "remediation": "Remediation string...",
    "occurredAt": "2018-01-25T05:50:52.375Z",
    "errors": [
      {
        "_id": "ccdbe2c5c938a230667b3827",
        "message": "An optional embedded error"
      },
      {
        "_id": "dbe9088dcfe2460f229338a3",
        "message": "Another optional embedded error"
      }
    ],
    "_links": {
      "describedby": {
        "href": "https://developer.apiture.com/errors/errorType1"
      }
    }
  },
  "x-apiture-resolved-from": "https://static.api.apiture.com/schemas/common/error/v2.1.1/model.json",
  "x-apiture-namespace": "common"
}