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
Description: Centralize error handling and return a consistent error payload.
Current state: Controllers build ad-hoc Map responses; no @ControllerAdvice present.
Tasks:
Add spring-boot-starter-validation if needed for error binding; create GlobalExceptionHandler with handlers for MethodArgumentNotValidException, AccessDeniedException, EntityNotFoundException, and fallback.
Define standard error JSON: {timestamp, status, error, message, path, traceId}.
Replace manual map returns as appropriate.
Acceptance criteria:
Errors across endpoints follow the contract; tests assert shape.