SwipeForMovie Developer

Errors

Handle stable public error codes and request IDs.

Errors have one public JSON shape. Database messages, stack traces, and internal implementation details are not returned.

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The request parameters are invalid.",
    "request_id": "req_01J7EXAMPLE"
  }
}

Error codes

StatusCodeMeaning
400VALIDATION_ERRORA query or path parameter is missing, unknown, malformed, or outside its range.
401MISSING_API_KEYNo API key was sent.
401INVALID_API_KEYThe key scheme, format, or lookup failed.
403API_KEY_DISABLEDThe key exists but is inactive.
404TITLE_NOT_FOUNDNo title matches the supplied title ID.
429RATE_LIMITEDThe minute throttle rejected the request.
429MONTHLY_QUOTA_EXCEEDEDThe key exhausted its monthly policy.
404ROUTE_NOT_FOUNDNo route matches the request.
500INTERNAL_ERRORAn unexpected internal error occurred.

Validation behavior

Query objects are strict. Unknown parameters, including the obsolete cursor parameter, return VALIDATION_ERROR. Most validation failures use the generic message. Invalid title IDs use the specific message The IMDb ID must match ^tt\d+$. Search text that contains no letters or numbers uses The search query must contain letters or numbers.

Request IDs

Every response includes X-Request-Id, and every JSON envelope repeats it in meta.request_id or error.request_id.

You may supply X-Request-Id. The server accepts it only when it is no longer than 128 characters and contains letters, digits, ., _, or -. Otherwise the server generates a UUID.

Handling failures

Branch on the HTTP status first, then on the stable error.code. Show the public message when useful, log the request ID, and avoid retrying validation or authentication errors without changing the request.

On this page