Skip to content

fix: map database scheduling conflicts to HTTP 409 - #10

Merged
nooby6 merged 4 commits into
mainfrom
fix/constraint-conflict-api-responses
Oct 16, 2026
Merged

nooby6 merged 4 commits into
mainfrom
fix/constraint-conflict-api-responses

Conversation

@nooby6

@nooby6 nooby6 commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Translate PostgreSQL exclusion constraint SQLSTATE 23P01 into stable SHIFT_CONFLICT and LEAVE_CONFLICT API errors.
  • Keep database details out of client-facing error messages.
  • Return a generic DATA_INTEGRITY_VIOLATION response for other data integrity failures.
  • Add unit tests for shift conflicts, leave conflicts, and generic constraint failures.
  • Update the roadmap to reflect the completed error mapping.

Why

Service-level overlap checks improve error messages but cannot prevent races. PostgreSQL remains the concurrency boundary, so its exclusion-constraint failures must be translated into predictable API responses rather than surfacing as HTTP 500.

Validation

GitHub Actions will run the Gradle suite and PostgreSQL integration tests.

@nooby6
nooby6 merged commit 4d32c22 into main Oct 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant