Closed valeriopaone closed 5 years ago
check out the Spring MVC documentation for error handling. This is a good article too that goes into details: https://www.journaldev.com/2651/spring-mvc-exception-handling-controlleradvice-exceptionhandler-handlerexceptionresolver
In the SAMLUserDetailsServiceImpl, in the event that my user is not registered with the system or if the user is disabled or in other cases i generate a UsernameNotFoundException with a different message for each case. This exception automatically calls my endpoint "/error" which in my case is not an html. What are the attributes that I can pass to the method of this endpoint from which I can read the exception message?
I tried with the classic attributes of a SimpleUrlAuthenticationFailureHandler (HttpServletRequest request, HttpServletResponse response, Exception exception) but the exception is not what I expect I looked for this information everywhere but I did not
Thanks in advance