Ferra.rs / Error Types / invalid_cursor

invalid_cursor

Invalid Cursor

400 Bad Request

Returned when a ?cursor=… query parameter cannot be decoded into a valid keyset-pagination token. New in v0.7.5 — the first addition to the closed ERROR_TYPES namespace since the soft-delete release (0.7.0).

Recovery: drop the cursor query parameter and restart pagination from the first page. The detail field is the constant literal shown below — the framework never echoes the bytes of the malformed cursor back to the client (no detail, no instance, no extension field carries them). This is deliberate: a cursor that survives a copy/paste corruption — or a probe carrying adversarial bytes — must not function as a reflection oracle.

The same fixed detail string is emitted across all four rejection axes the framework recognises:

  1. URL-safe base64 decode failure.
  2. JSON parse failure on the decoded bytes.
  3. JSON shape mismatch (parses, but is not {"k": …, "v": <byte>}).
  4. Unknown version byte (v is not a value this framework version recognises).

Example RFC 7807 body

{
  "type":   "https://ferra.rs/errors/invalid_cursor",
  "title":  "Invalid Cursor",
  "status": 400,
  "detail": "the supplied cursor token is invalid; drop the `cursor` query parameter and restart pagination"
}
← All error types