Aglet

Triage an API cursor pagination break

A paged read can look successful while losing a page or visiting one twice. Start with one stable query and preserve its filters, sort, cursor, and returned identifiers. Compare the response link with the client checkpoint, then separate cursor invalidation from mutable data or merge logic.

Establish what is happening

  1. Capture the first broken page

    Record the initial query, page size, sort, environment, client revision, and first unexpected identifier. Save the next-page token only if it is safe to retain. Note whether the response had items, a continuation link, or an empty page where records were expected.

  2. Walk the cursor boundary

    Follow the same query from its first page through each next request. Compare the cursor sent, token returned, filters, and identifier range at every hop. A changed filter or regenerated token can explain a gap without proving that the remote dataset lost records.

  3. Bound the missing population

    Compare expected and received identifiers for one time window or fixture. Group gaps by query shape, client version, dataset mutation, and checkpoint age. Keep a repeated page, invalid cursor, mutable collection, and local merge bug as separate findings.

What to carry forward

Triage ends with a reproducible query, page boundary, affected identifier range, and evidence gap list. Stop before restarting every read from page one. Route cursor, data mutation, and merge questions separately so replay has a named safe boundary.

Technical background: Contentful technical guide.

Keep the decision with the work.

Use a Work Item in Aglet to record the problem, the evidence you have, and the next decision. Add an owner and priority, then keep updates in the discussion so the next person can follow the reasoning.

Create an account See the product workflow