Merge pull request #77 from mrjohnson22/master
#76 Set a message for error responses
This commit is contained in:
@@ -23,5 +23,6 @@ package io.kamax.mxisd.exception;
|
||||
public class InvalidParamException extends RuntimeException {
|
||||
|
||||
public InvalidParamException() {
|
||||
super("The chosen hash algorithm is invalid or disallowed");
|
||||
}
|
||||
}
|
||||
|
@@ -23,5 +23,6 @@ package io.kamax.mxisd.exception;
|
||||
public class InvalidPepperException extends RuntimeException {
|
||||
|
||||
public InvalidPepperException() {
|
||||
super("The provided pepper is invalid or expired");
|
||||
}
|
||||
}
|
||||
|
@@ -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