Skip to content

The Error object

The answer to a request that failed. type and the HTTP status say what kind of failure it is, code the exact reason.

Every request that fails answers with this object instead of data, with an HTTP status of 400 or more. Each operation's page lists the codes it can answer, with what to do about each.

Fields

FieldType and description
error

object

What went wrong.

type

string

The error's family, from the HTTP status. Stable: switch on it first.

Known values: invalid_request_errorauthentication_errorpayment_errorpermission_errornot_found_errorconflict_errorrate_limit_errorapi_error More can appear.

code

string

The exact reason, in snake_case. The errors guide lists every code; new codes can appear.

message

string

What went wrong, in a sentence for a person. Not for parsing: the wording can change.

fields

object

When the request is at fault: each field's path (site.adminEmail) and what's wrong with it.

requestId

string

The request's id, the same as the X-Request-Id header. Quote it to support.

docUrl

string

The errors guide, at this code.

requiredScopes

array of strings

With insufficient_scope: every scope the operation needs.

missingScopes

array of strings

With insufficient_scope: the scopes the token lacks.

expiredAt

string An ISO 8601 time, in UTC

With token_expired: when the token expired.

retryAfterSeconds

integer

With rate_limited, api_read_only and api_unavailable: seconds to wait before trying again, as in Retry-After.

scope

string

With rate_limited: which limit was reached.

Known values: tokenaccountcreateoperationnetwork More can appear.

limit

integer

With rate_limited: the number of requests the limit allows in its window.

Example

The Error object
{
  "error": {
    "type": "invalid_request_error",
    "code": "validation_failed",
    "message": "Choose a plan offered on the cloud you picked",
    "fields": {
      "planId": "Choose a plan offered on the cloud you picked"
    },
    "requestId": "req_8Zk2mPq4Xc7Lw9Tn0Bv3Ys",
    "docUrl": "https://rabbitflare.com/docs/api/errors#validation_failed"
  }
}

Returned by

Any operation, when the request fails.

Popular

API docs