Errors

The Cycle API uses standard HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx range indicate success. Codes in the 4xx range indicate a request that failed due to input, and codes in the 5xx range indicate an error on Cycle's part (rare).

There are two types of error response objects. Errors with authentication are formatted to follow the OAuth spec, while all other errors follow the same convention. If you're using one of our API Libraries, they will standardize OAuth errors to fit the general convention.

HTTP Response Codes

  • 200 - OK
    Request was successful.
  • 201 - Created
    Request was successful, and a new resource was created.
  • 202 - Accepted
    A resource has been queued for processing at a later time, usually with a job.
  • 400 - Bad Request
    This usually means the data sent was in an invalid format.
  • 401 - Unauthorized
    OAuth token is invalid.
  • 403 - Forbidden
    The token provided does not have sufficient permissions to access the resource.
  • 404 - Not Found
    The requested resource doesn't exist.
  • 415 - Invalid Media
    Request is missing a valid Content-Type header.
  • 422 - Unprocessable Entity
    Indicates an issue with posted data, for example an invalid or missing field.
  • 500 - Server Error
    Indicates an issue with Cycle. Rare.

The Error Object

Attributes
  • status
    integer

    The HTTP response code.

  • code
    string

    A Cycle standard error code (see right).

  • title
    string

    The main text describing the error.

  • detail
    string
    optional

    A more detailed description of the error.

  • source
    string
    optional

    A JSON pointer describing the source of an error.

Example Error
{
"status": 404,
"code": "404.container",
"title": "Could not find container"
}

Error Codes

  • 400.invalid_syntax
    Something about the request is malformed.
  • 403.hub_mismatch
    Attempted to request a resource from a different hub.
  • 403.hub_not_ready
    The hub isn't ready to handle this request.
  • 403.environment_not_ready
    Environment isn't ready to handle this request.
  • 403.restricted_portal
    The request can only be made from the official Cycle portal.
  • 403.signup
    The request can only be made with a signup token.
  • 403.permissions
    Insufficient permissions to make request.
  • 403.wrong_scope
    Attempting to modify a resource from the wrong hub scope.