PostgreSQLRunbook 0/2 done
22P02
PostgreSQL Error 22P02: Invalid text representation
Error✕ Not retryable · fix the payloadHTTP 400 Bad RequestDatabase
TL;DR · 10-second read
A string could not be cast to the column type (uuid, integer, boolean, enum). Validate route params before querying; "undefined" usually means a missing JS variable.
Identify: does your log match?
What you see · exact log / response
ERROR: invalid input syntax for type uuid: "undefined"
LINE 1: SELECT * FROM users WHERE id = 'undefined';
^Fix
Being written
Copy-paste fixes for 22P02 are in the enrichment queue
The summary above is verified. Paste your full trace into the decoder for a diagnosis now.
Open the decoder →Related errors
Last verified 2026-10-07 · Source: Official Appendix A error codes (errcodes.txt in the postgres repo) · Official docs ↗ · ~5,400 searches/mo