I develop a spring boot REST service. I use @ControllerAdvice for exception catching. Also, I have a custom AuthenticationProvider and check a lice
@ControllerAdvice
AuthenticationProvider