# Postgres error 23P01: conflicting key value violates exclusion constraint

> A row overlaps another row in a way an exclusion constraint forbids, such as two bookings for the same room at the same time.

Source: https://scribase.com/postgres-errors/23p01

SQLSTATE class: Integrity Constraint Violation. Over PostgREST/supabase-js this maps to HTTP 400.

## Causes

- The new range overlaps an existing one with the same key.

## Fixes

- Treat it as a normal "slot taken" outcome in the app.
- Use half-open ranges ([start, end)) so back-to-back bookings do not count as overlapping.