#76 Set a message for error responses
Without one, clients might treat errors as generic failures instead of handling them in a manner appropriate for their error code
This commit is contained in:
@@ -189,7 +189,7 @@ public abstract class BasicHttpHandler implements HttpHandler {
|
||||
}
|
||||
|
||||
protected void respond(HttpServerExchange ex, int status, String errCode, String error) {
|
||||
respond(ex, status, buildErrorBody(ex, errCode, error));
|
||||
respond(ex, status, buildErrorBody(ex, errCode, error != null ? error : "An error has occurred"));
|
||||
}
|
||||
|
||||
protected void handleException(HttpServerExchange exchange, HttpMatrixException ex) {
|
||||
|
||||
Reference in New Issue
Block a user