Skip to content

Latest commit

 

History

History
85 lines (49 loc) · 2.14 KB

errors.rst

File metadata and controls

85 lines (49 loc) · 2.14 KB

Errors

Format

When one or more errors occur, they are returned to the client in an object with three fields:

  • error_message: A description of the error that occurred.
  • error_point: The point at which the error occurred. Always present, but can sometimes be null.

Types

The types of errors:

  • validation: An error occurred while validating the submitted data. If the error is related to a particular field, it will set the :ref:`error_point <error_point>`.
  • notexist: The object you are trying to access does not exist.
  • backend: There was a problem completing the request on the backend. Please contact the support department.
  • database: There was a database error.
  • concurrency: There was a concurrency error caused by two simultaneous conflicting operations (i.e. trying to start and delete a server at the same time). The operation should be retried.
  • billing: There was a billing problem.
  • payment: There was a problem processing your payment.

Example

.. http:post:: /subscriptions/

   **Example request**:

    .. parsed-literal::

        {
            "amount": "1",
            "from_time": "2012-03-28T14:10:15.948157",
            "period": "2 weeks"
        }

   **Example response**:

    .. parsed-literal::

                [
                    {
                        "error_message": "This field is required",
                        "error_point": "resource",
                        "error_type": "validation"
                    }
                ]