22P02
what this Postgres error means
How it shows up
invalid input syntax for type uuid: "<value>"
What it means
SQLSTATE 22P02 is invalid_text_representation: a value arrived as text that cannot be read as the column's type, for example a string that is not a valid UUID.
The usual cause in an AI-built app
AI-generated code often filters by an id taken from the URL or from app state before it has loaded, so the query sends "undefined" or an empty string where a UUID is expected.
Check this first
Read the value shown in quotes at the end of the error. If it is undefined, null or empty, find where your code reads that id and make sure it is set before the query runs.