Supabase Stability Code quality

Repeated constraint violations

Part of the Runtime error logs check

What it is

The logs show repeated constraint violations — unique, foreign key, or not-null — over the last 24 hours.

Why it matters

The database is rejecting writes the application believed were valid. Repeated violations usually mean a retry loop hammering the same failure, or a race the code does not handle, and the user-visible result is a broken action.

How to fix it

Find which constraint is failing and why. Unique violations on retry want an upsert or an idempotency key; foreign key violations usually mean an ordering problem between writes that needs a transaction.

Run them all on your app

Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.