Error codes

Errors use a stable error.code. Bad input is always a 4xx, never a 5xx.

CodeStatusMeaningHow to fix
bad_request400The request could not be understood.Check the request line, headers and parameters against the endpoint documentation.
invalid_json400The request body is not valid JSON.Send a well-formed JSON document with the header Content-Type: application/json.
unauthorized401This request is not authorised.Call the API through RapidAPI with your X-RapidAPI-Key and X-RapidAPI-Host headers.
not_found404No endpoint exists at this path.See /docs or /openapi.json for the list of endpoints.
method_not_allowed405This endpoint does not support the HTTP method used.Use one of the methods listed in the Allow response header.
payload_too_large413The 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_type415The request body has an unsupported Content-Type.Set the Content-Type header to one of the types documented for this endpoint.
invalid_parameters422One or more parameters are invalid.Correct the fields listed in error.details; each entry names the field and the rule it broke.
unknown_country422The 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_subdivision422The 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_currency422The 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_timezone422The 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_airport422No 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_language422The 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_locale422The 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_date422The 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_available422No holiday rules exist for this country or subdivision.GET /v1/holidays/countries lists the 200+ supported countries and their subdivision codes.
range_too_large422The 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_available422The 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_limited429Too many requests.Wait for the number of seconds in the Retry-After header, or upgrade your plan.
internal_error500An unexpected error occurred. It has been logged without your payload.Retry the request. If it keeps failing, contact support with the request_id.
upstream_unavailable503A network dependency is temporarily unavailable and no cached value exists.Retry after the number of seconds in the Retry-After header.