We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Configuration @Import(SecurityProblemSupport::class) class SecurityConfig{ @Autowired lateinit var problemSupport: SecurityProblemSupport //... @Bean fun springWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain = http { //.... exceptionHandling { authenticationEntryPoint = problemSupport accessDeniedHandler = problemSupport } authorizeExchange { // ignore all default static resources authorize(pathMatchers("/{id}/**"), customCheck()) //... } } fun customCheck():ReactiveAuthenctionManager<AuthenticationContext>{ // a runtime IllegalArgumentException was thrown here. } }
I have created an exception handler for IllegalArgumentException, it is working well for handling the exceptions from controllers.
IllegalArgumentException
Handled IllegalArgumentException, return a 400 status.
But it throws a 500 internal error instead.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
I have created an exception handler for
IllegalArgumentException
, it is working well for handling the exceptions from controllers.Expected Behavior
Handled
IllegalArgumentException
, return a 400 status.Actual Behavior
But it throws a 500 internal error instead.
The text was updated successfully, but these errors were encountered: