Use proper return codes for session errors
This commit is contained in:
@@ -25,7 +25,7 @@ import org.apache.http.HttpStatus;
|
||||
public class SessionNotValidatedException extends HttpMatrixException {
|
||||
|
||||
public SessionNotValidatedException() {
|
||||
super(HttpStatus.SC_OK, "M_SESSION_NOT_VALIDATED", "This validation session has not yet been completed");
|
||||
super(HttpStatus.SC_BAD_REQUEST, "M_SESSION_NOT_VALIDATED", "This validation session has not yet been completed");
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -20,6 +20,8 @@
|
||||
|
||||
package io.kamax.mxisd.exception;
|
||||
|
||||
import org.apache.http.HttpStatus;
|
||||
|
||||
public class SessionUnknownException extends HttpMatrixException {
|
||||
|
||||
public SessionUnknownException() {
|
||||
@@ -27,7 +29,7 @@ public class SessionUnknownException extends HttpMatrixException {
|
||||
}
|
||||
|
||||
public SessionUnknownException(String error) {
|
||||
super(200, "M_NO_VALID_SESSION", error);
|
||||
super(HttpStatus.SC_NOT_FOUND, "M_NO_VALID_SESSION", error);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user