Skip to content

K13.8: bad ids and cookies get 404/401, not 500 - #142

Merged
MFrancis-dev merged 1 commit into
mainfrom
fix/bad-input-500s
Nov 8, 2026
Merged

MFrancis-dev merged 1 commit into
mainfrom
fix/bad-input-500s

Conversation

@MFrancis-dev

Copy link
Copy Markdown
Owner

Fix 7 from the pre-launch review (crashes).

Problem: a non-UUID id in /api/fund/:id/… went straight to a uuid column and Postgres threw (500). A malformed stack_session cookie made decodeURIComponent throw, so that browser got a 500 on every API call.

Fix: uuidParam() turns a non-UUID id into 404; readCookie treats an undecodable cookie as absent (signed out, 401).

Tests: 2 new, both confirmed failing before the fix. 150 total.

Docs: README status, ARCHITECTURE §4.1, ROADMAP.

Closes #134

A non-UUID funding id reached the uuid column and a malformed cookie made
cookie decoding throw, so both returned 500.

Closes #134
@MFrancis-dev
MFrancis-dev merged commit eab9bc8 into main Nov 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

K13.8 Bad ids and malformed cookies return 500

2 participants