added rest exception framework
This commit is contained in:
@ -44,9 +44,9 @@ public class APIExceptionInterceptor {
|
|||||||
errorResponse = ((APIException) ex).getHttpResponse();
|
errorResponse = ((APIException) ex).getHttpResponse();
|
||||||
} else if (ex.getCause() instanceof APIException) {
|
} else if (ex.getCause() instanceof APIException) {
|
||||||
errorResponse = ((APIException) ex.getCause()).getHttpResponse();
|
errorResponse = ((APIException) ex.getCause()).getHttpResponse();
|
||||||
// } else if (ex instanceof ConstraintViolationException) {
|
} else if (ex instanceof ConstraintViolationException) {
|
||||||
// this exception is handled via the ConstraintViolationMapper
|
// this exception is handled via the ConstraintViolationMapper
|
||||||
// throw (ConstraintViolationException) ex;
|
throw (ConstraintViolationException) ex;
|
||||||
} else if (ex.getCause() instanceof ConstraintViolationException) {
|
} else if (ex.getCause() instanceof ConstraintViolationException) {
|
||||||
// this exception is handled via the ConstraintViolationMapper
|
// this exception is handled via the ConstraintViolationMapper
|
||||||
throw (ConstraintViolationException) ex.getCause();
|
throw (ConstraintViolationException) ex.getCause();
|
||||||
|
|||||||
Reference in New Issue
Block a user