You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:AuthService.register() suffers from a Time-of-Check to Time-of-Use (TOCTOU) race condition, resulting in generic 500 errors if unique constraints are violated concurrently.
Acceptance Criteria:
Update GlobalExceptionHandler to explicitly catch DataIntegrityViolationException.
Map unique constraint violations (specifically on the users table email column) to a 409 Conflict HTTP response.
Adopt RFC 7807 (ProblemDetail) for all error responses instead of custom maps.
Problem:
AuthService.register()suffers from a Time-of-Check to Time-of-Use (TOCTOU) race condition, resulting in generic 500 errors if unique constraints are violated concurrently.Acceptance Criteria:
GlobalExceptionHandlerto explicitly catchDataIntegrityViolationException.userstable email column) to a409 ConflictHTTP response.ProblemDetail) for all error responses instead of custom maps.