mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Suppress API version errors on ERROR dispatch
While an API version may be important for mapping in an ERROR dispatch, it is more important to allow the original exception to be handled. Closes gh-36058
This commit is contained in:
+1
-1
@@ -549,7 +549,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
|
||||
return null;
|
||||
}
|
||||
|
||||
if (versionHolder.hasError()) {
|
||||
if (versionHolder.hasError() && !request.getDispatcherType().equals(DispatcherType.ERROR)) {
|
||||
throw versionHolder.getError();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user