Affects: 5.2.12
Hi, I have used interceptor to verify something. And an exception occurred in the interceptor while processing the Pre-Flight request. However, since PreFlightHandler
is not a child of HandlerMethod
, the exception that occurs during the Pre-Flight process is not handled by the ExceptionHandler
.(Since AbstractHandlerMethodExceptionResolver
only apply to HandlerMethod
). So, response status becomes 500 not status I intended.
Is this intended or just a bug?
Comment From: rstoyanchev
@ddaaac the pre-flight handler should update the response and typically there should be no need for any exception handling. Is DefaultCorsProcessor
running into an exception somehow? Or are you handling this through the CorsFilter
in which case the request doesn't even reach the DispatcherSevlet
?
Note that starting in 5.3 we do support use of @ControllerAdvice
to handle exceptions from any handler, but again for pre-flight requests, there shouldn't be any exceptions.
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.