Improve error message
parent
58543ac9c4
commit
7871ee0f26
|
@ -16,8 +16,8 @@ if (request.getAttribute("error") != null && request.getAttribute("error") insta
|
||||||
} else if (request.getAttribute("javax.servlet.error.status_code") != null) {
|
} else if (request.getAttribute("javax.servlet.error.status_code") != null) {
|
||||||
Integer code = (Integer)request.getAttribute("javax.servlet.error.status_code");
|
Integer code = (Integer)request.getAttribute("javax.servlet.error.status_code");
|
||||||
HttpStatus status = HttpStatus.valueOf(code);
|
HttpStatus status = HttpStatus.valueOf(code);
|
||||||
request.setAttribute("errorCode", status.toString());
|
request.setAttribute("errorCode", status.toString() + " " + status.getReasonPhrase());
|
||||||
request.setAttribute("message", status.getReasonPhrase());
|
request.setAttribute("message", request.getAttribute("javax.servlet.error.message"));
|
||||||
} else {
|
} else {
|
||||||
request.setAttribute("errorCode", "Server error");
|
request.setAttribute("errorCode", "Server error");
|
||||||
request.setAttribute("message", "See the logs for details");
|
request.setAttribute("message", "See the logs for details");
|
||||||
|
|
Loading…
Reference in New Issue