You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(api): GET /v1/profiles/general swallows DB errors and returns an empty profile with 200 #588
Both halves of /v1/profiles/general discard the Postgres error and return a success-shaped body, so a permissions failure or missing row is indistinguishable from "this user has an empty profile".
error is never destructured. A grant gap (the class of bug in #481) or an RLS denial returns 200 with every field blank. The client then renders an editable empty form — and #580 turns that into a write of blanks.
Acceptance
Both queries check error and return 500 with the message.
.single() is replaced with .maybeSingle() so "no row yet" is a legitimate empty result, distinct from a failure.
A test asserts a forced DB error yields 5xx, not a 200 with empty strings.
Fixed in #597 — both queries now check error and return 5xx, and .single() became .maybeSingle() so "no row yet" stays a legitimate empty result rather than an error. This was the input that made #580 destructive.
Activity
thinkclay commentedon Aug 12, 2026
Part of the profile-building audit rollup: #594
fix(profile): stop General Information saving blanks over real data (#…
thinkclay commentedon Aug 12, 2026
Fixed in #597 — both queries now check
errorand return 5xx, and.single()became.maybeSingle()so "no row yet" stays a legitimate empty result rather than an error. This was the input that made #580 destructive.