Resolve httpstatus error series using raw int code

See gh-16691
pull/17884/head
Madhura Bhave 5 years ago
parent 186530478c
commit eea83e935e

@ -124,11 +124,11 @@ public class DefaultErrorWebExceptionHandler extends AbstractErrorWebExceptionHa
}
private List<String> getData(int errorStatus) {
HttpStatus errorHttpStatus = HttpStatus.resolve(errorStatus);
List<String> data = new ArrayList<>();
data.add("error/" + errorStatus);
if (errorHttpStatus != null) {
data.add("error/" + SERIES_VIEWS.get(errorHttpStatus.series()));
HttpStatus.Series series = HttpStatus.Series.resolve(errorStatus);
if (series != null) {
data.add("error/" + SERIES_VIEWS.get(series));
}
data.add("error/error");
return data;

Loading…
Cancel
Save