error-handling-spring-boot-starter icon indicating copy to clipboard operation
error-handling-spring-boot-starter copied to clipboard

Spring Boot 3.3.2 throws AuthorizationDeniedException instead of AccesDeniedException

Open BartDuwez opened this issue 6 months ago • 2 comments

Hi Wim,

we are running into an issue where spring security is throwing an AuthorizationDeniedException instead of an AccessDeniedException. This exception is not handled in the io.github.wimdeblauwe.errorhandlingspringbootstarter.handler.SpringSecurityApiExceptionHandler as it does not yet exist in the spring boot version you are using. This causes the http response to be 500 instead of 403.

This is a new exception that comes with the spring boot update. Do you have any plans regarding updating your library?

Kind regards, Bart

BartDuwez avatar Jul 30 '24 11:07 BartDuwez