Docs / Errors

INVALID_CURSOR

400Invalid cursor

Why it happens

The cursor of a list is malformed, was changed, or comes from a page that is too old. A cursor is opaque: only a pagination.nextCursor the API returned is valid, unchanged, with the same filters.

What to do

  • Start again from the first page, without cursor.
  • Pass pagination.nextCursor exactly as received: never build, edit or store a cursor for later.
  • Stop paging when pagination.hasMore is false.

Example response

http
HTTP/1.1 400
{
  "type": "https://hub.masjidbox.com/docs/errors/INVALID_CURSOR",
  "title": "Invalid cursor",
  "status": 400,
  "detail": "The cursor is malformed, tampered with or expired: start again from the first page.",
  "instance": "/v1/masjids/msj_abc123defg",
  "code": "INVALID_CURSOR",
  "requestId": "req_8f14e45fceea167a5a36dedd4bea2543",
  "requestLogUrl": "https://hub.masjidbox.com/console/logs/req_8f14e45fceea167a5a36dedd4bea2543"
}