Errors use a stable error.code. Bad input is always a 4xx, never a 5xx.
| Code | Status | Meaning | How to fix |
|---|---|---|---|
bad_request | 400 | The request could not be understood. | Check the request line, headers and parameters against the endpoint documentation. |
invalid_json | 400 | The request body is not valid JSON. | Send a well-formed JSON document with the header Content-Type: application/json. |
unauthorized | 401 | This request is not authorised. | Call the API through RapidAPI with your X-RapidAPI-Key and X-RapidAPI-Host headers. |
not_found | 404 | No endpoint exists at this path. | See /docs or /openapi.json for the list of endpoints. |
method_not_allowed | 405 | This endpoint does not support the HTTP method used. | Use one of the methods listed in the Allow response header. |
payload_too_large | 413 | The request body exceeds the size limit for this endpoint. | Reduce the payload below the documented limit, or split the work across several calls. |
unsupported_media_type | 415 | The request body has an unsupported Content-Type. | Set the Content-Type header to one of the types documented for this endpoint. |
invalid_parameters | 422 | One or more parameters are invalid. | Correct the fields listed in error.details; each entry names the field and the rule it broke. |
unknown_country | 422 | The country code is not a known ISO 3166-1 code. | Use an alpha-2 (ZA), alpha-3 (ZAF) or numeric (710) code; GET /v1/countries lists them all. |
unknown_subdivision | 422 | The subdivision code is not a current ISO 3166-2 code. | Use a code such as US-CA or ZA-GP; GET /v1/subdivisions?country=XX lists a country’s codes. |
unknown_currency | 422 | The currency code is not a current ISO 4217 code. | Use a three-letter code such as USD, EUR or ZAR; GET /v1/currencies lists them all. |
unknown_timezone | 422 | The time zone is not a known IANA time zone. | Use an IANA name such as Europe/London or Africa/Johannesburg; GET /v1/timezones lists them. |
unknown_airport | 422 | No airport has this IATA or ICAO code. | Use a 3-letter IATA code (JNB) or a 4-letter ICAO code (FAOR); GET /v1/airports/search finds codes by name or city. |
unknown_language | 422 | The language code is not a known ISO 639 code. | Use ISO 639-1 (de) or ISO 639-2/3 (deu, ger); GET /v1/languages lists them. |
invalid_locale | 422 | The locale is not a well-formed BCP 47 language tag. | Use a tag such as en-ZA, pt-BR, zh-Hant-TW or sr-Latn. |
invalid_date | 422 | The date is not a valid ISO 8601 calendar date. | Use YYYY-MM-DD (date) or YYYY-MM-DDTHH:mm[:ss][Z|±hh:mm] (date-time) between years 1 and 9999. |
holidays_not_available | 422 | No holiday rules exist for this country or subdivision. | GET /v1/holidays/countries lists the 200+ supported countries and their subdivision codes. |
range_too_large | 422 | The requested range is larger than this endpoint allows. | Split the request into smaller ranges; the limit is in the error message and in the endpoint’s docs. |
rate_not_available | 422 | The ECB has no reference rate for this currency or date. | ECB rates cover ~30 currencies on TARGET business days of the last 90 days; GET /v1/rates/latest lists the currencies. |
rate_limited | 429 | Too many requests. | Wait for the number of seconds in the Retry-After header, or upgrade your plan. |
internal_error | 500 | An unexpected error occurred. It has been logged without your payload. | Retry the request. If it keeps failing, contact support with the request_id. |
upstream_unavailable | 503 | A network dependency is temporarily unavailable and no cached value exists. | Retry after the number of seconds in the Retry-After header. |