Errors

Every POST/PUT endpoint might throw validation errors if expectations are not met. When that happens, an HTTP status code of 400 (Bad Request) is returned, with a JSON document that defines the entity that failed validation, the main error of validation, the set of errors that ties failed fields with their validation error, and a type indicating that this is a validation_error.

Example

HTTP/1.1 400 Bad Request
{
    "entity": "Tactic.Actions.Schedules.CreateSelfAction+Request",
    "error": "slots:range",
    "errors": {
        "slots": "range"
    },
    "type": "validation_error"
}

Error Messages

Error messages are not actual human readable messages, but simply a key value indicating the type of error. That gives any API client implementation their own means for internationalization of validation messages. So far we have the following validation error types:

Error Types

  • datetime
  • duplicate
  • email
  • invalid
  • length
  • range
  • required
Was this page helpful?