Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0
Why this matters
stream.controller.ts:181 (Number.parseInt(offset,10) || 0) and :297-298, plus user.controller.ts:88, keep a negative parsed value (-5 is truthy, so || 0 does not replace it) and pass it straight to Prisma skip. Prisma rejects a negative skip with a validation error, returned as 500. So GET /v1/streams?offset=-1 and the events endpoints all 500. The correct guard already exists in events.routes.ts:96.
Acceptance criteria
Files to touch
backend/src/controllers/stream.controller.ts
backend/src/controllers/user.controller.ts
Out of scope
- Cursor-based pagination changes
Why this matters
stream.controller.ts:181 (Number.parseInt(offset,10) || 0) and :297-298, plus user.controller.ts:88, keep a negative parsed value (-5 is truthy, so || 0 does not replace it) and pass it straight to Prisma skip. Prisma rejects a negative skip with a validation error, returned as 500. So GET /v1/streams?offset=-1 and the events endpoints all 500. The correct guard already exists in events.routes.ts:96.
Acceptance criteria
Files to touch
backend/src/controllers/stream.controller.tsbackend/src/controllers/user.controller.tsOut of scope