23502

what this Postgres error means

How it shows up

null value in column "<column>" of relation "<table>" violates not-null constraint

What it means

SQLSTATE 23502 is not_null_violation: the row leaves a required column empty (null), and that column is declared NOT NULL.

The usual cause in an AI-built app

The AI marked a column such as user_id as required in the SQL, but the app's insert does not send it, often because the code expects the database to fill it and no default value was ever set.

Check this first

Look at the column named in the error and check whether your insert sends a value for it or the column has a default value in the Table Editor.

More Postgres codes