Fix DefaultErrorViewResolver after HttpStatus changes

Since SPR-16898, `HttpStatus.toString()` has changed and we should
instead rely on `HttpStatus.value()` to get the HTTP status number.
pull/13534/head
Brian Clozel 7 years ago
parent 6970f19ce3
commit 28c1bc9986

@ -102,7 +102,7 @@ public class DefaultErrorViewResolver implements ErrorViewResolver, Ordered {
@Override
public ModelAndView resolveErrorView(HttpServletRequest request, HttpStatus status,
Map<String, Object> model) {
ModelAndView modelAndView = resolve(String.valueOf(status), model);
ModelAndView modelAndView = resolve(String.valueOf(status.value()), model);
if (modelAndView == null && SERIES_VIEWS.containsKey(status.series())) {
modelAndView = resolve(SERIES_VIEWS.get(status.series()), model);
}

Loading…
Cancel
Save