Your browser is not fully supported. For the best experience, please try using the latest version of Google Chrome, Mozilla Firefox, or Apple Safari.

Back to the API documentation

Pylon Observer API Error Codes Reference

Introduction

API error responses documented here adhere to the Problem Details format. Here is an example of the body of an HTTP response representing a validation error:

{
  "type": "https://observer.getpylon.com/docs/errors#validation_error",
  "title": "Some parameters failed validation.",
  "status": 422,
  "errors": {
    "email": [
      "The email must be a valid email address."
    ],
    "first_name": [
      "The first name field is required."
    ]
  }
}

The type property should always link to a section of this page. If any error types are missing or their explanation is unclear, please contact support.

Every error response contains a code property. This property is an addition to the Problem Details spec. The code will always match the type property. Even if we change our documentation URL, for example, the code property will remain unchanged, and will continue to uniquely identify the error type.

Clients may wish to use the code to decide how to recover from errors; it will remain stable and unique for a particular problem type. However, we encourage relying instead on the HTTP status (included in the body as the status property). For example, a 400 response should not be retried without amending the invalid properties. A 500 response may be retried, taking note of the Retry-After header if present. When displaying errors to humans, use the title and detail properties.

Error types

Authentication Error

This error indicates that the request has not provided authentication information, or the information is invalid.

Internal Error

This error code indicates that something has gone wrong inside our application. Your request was probably valid, but there may have been a temporary networking error, or a bug in the API. We will endeavour to resolve all internal errors as quickly as possible.

JSON Error

This error indicates that the request contains JSON data with invalid syntax. We recommend checking your request body against the JSON spec, using a JSON linter, or making requests using a library which automatically outputs valid JSON.

Unknown Error

This error has not yet been diagnosed or documented. We will update all errors of this kind as soon as we become aware of them.

Validation Error

This error indicates something is wrong with the semantics of the request payload. It is not a formatting error like invalid JSON, for example. The response code is usually 422. Do not attempt to repeat a request after receiving this response; it will never succeed unmodified.

The response will include an additional errors parameter which contains the errors relating to specific fields. There might be more than one error per field. The errors are encoded as human-readable strings in English.

{
    "type": "https://observer.getpylon.com/docs/errors#validation_error",
    "title": "Some parameters failed validation.",
    "status": 422,
    "errors": {
        "email": [
            "The email must be a valid email address."
        ],
        "first_name": [
            "The first name field is required."
        ]
    }
}

Stripe API Error

For detailed documentation on errors returned by performing Stripe operations, see the Stripe documentation.

Xero Integration Error

Xero may return errors when Pylon tries to perform actions on your behalf using our integration. In general, if one of these exceptions occurs, you should report the details to us as we endeavour to ensure you can't use the application in a way that causes errors when interacting with Xero.

For details on the specific problem types, read on:

ValidationException

Data sent to the Xero API was invalid. Validation messages from the Xero API response may be found in the xero_messages property.