ErrorsPostgres
22P02
A value was the wrong shape for its column
Text was sent where the column expects a specific type, and it could not be converted — most often an empty string arriving where a uuid or a number belongs.
Why it happens
In an AI-built app, specifically
An empty form field sends `""` rather than nothing, and an empty string is not a valid uuid. This is the single most common version of this error in a generated app: a select with no choice made, submitted as an empty string into an id column.
Steps
How to fix it
- 01Convert empty strings to null before sending them. An unfilled optional field should be null, not empty text.
- 02Check the value's type at the boundary rather than trusting the form.
Still stuck
If the steps did not do it
An error is one symptom, and the cause is often somewhere else entirely. The broken-app check reads your published site and looks at everything at once — and if it cannot tell either, connecting your repository is what lets Refinar read the code and fix it.
Nearby errors