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) { private List<String> getData(int errorStatus) {
HttpStatus errorHttpStatus = HttpStatus.resolve(errorStatus);
List<String> data = new ArrayList<>(); List<String> data = new ArrayList<>();
data.add("error/" + errorStatus); data.add("error/" + errorStatus);
if (errorHttpStatus != null) { HttpStatus.Series series = HttpStatus.Series.resolve(errorStatus);
data.add("error/" + SERIES_VIEWS.get(errorHttpStatus.series())); if (series != null) {
data.add("error/" + SERIES_VIEWS.get(series));
} }
data.add("error/error"); data.add("error/error");
return data; return data;

Loading…
Cancel
Save