Skip to content

Error Handling

When a request fails, the RIPE Atlas API returns an appropriate HTTP status code along with a JSON error response body.

Error Responses

An error response contains a JSON object with the following fields:

FieldTypeDescription
statusintegerThe HTTP status code
codeintegerAn internal error code (deprecated — do not rely on this)
detailstringA human-readable description of the error
titlestringA short summary of the error type
errorsarrayAn optional list of specific error objects with more detail

Example error response:

json
{
  "error": {
    "status": 400,
    "code": 104,
    "detail": "The following fields are invalid: target",
    "title": "Bad Request",
    "errors": [
      {
        "source": {
          "pointer": "/definitions/0/target"
        },
        "detail": "This field is required."
      }
    ]
  }
}

Error Objects

Individual errors within the errors array are modeled on the JSON API format (though the API is not strictly JSON API compliant). Each error object may contain:

FieldTypeDescription
sourceobjectIdentifies the source of the error
detailstringA human-readable explanation of the specific error

The source object contains one of:

  • pointer — a JSON Pointer (RFC 6901) to the field in the request body that caused the error (e.g. /definitions/0/target)
  • parameter — the name of the URL query parameter that caused the error (e.g. page_size)

Warning Objects

Successful responses (2xx status codes) may include a warnings list when the API encountered non-fatal issues during request processing. Warnings use the same structure as errors.

For example, a successful response with warnings:

json
{
  "count": 100,
  "next": "https://atlas.ripe.net/api/v2/measurements/?page=2",
  "previous": null,
  "results": [],
  "warnings": [
    {
      "source": {
        "parameter": "radius"
      },
      "detail": "Radius search only works in combination with latitude and longitude. Ignored."
    }
  ]
}

Warnings indicate that part of your request was adjusted or ignored. Review them to ensure you are getting the results you expect.