# Postgres error 22P02: invalid input syntax for type uuid / integer

> A text value could not be converted to the column or parameter type.

Source: https://scribase.com/postgres-errors/22p02

SQLSTATE class: Data Exception. Over PostgREST/supabase-js this maps to HTTP 400.

## Causes

- Passing a non-UUID string where a uuid is expected, such as the literal "undefined" or "null" from JavaScript, or an empty string.
- Sending "abc" or "12.5" to an integer column or filter.
- A malformed array or JSON literal.

## Fixes

- Check the value in the app before the query; for ids from URLs, validate the UUID format and answer 404 early.
- Send null rather than the string "null".
- For JSON, send a real JSON body or use to_jsonb on a properly quoted value.

From supabase-js this usually means a filter like .eq('id', someId) ran while someId was undefined. PostgREST answers 400.