improved error logging
This commit is contained in:
@ -44,9 +44,10 @@ public class APIExceptionInterceptor {
|
||||
proceedResponse = context.proceed();
|
||||
} catch (Exception ex) {
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(ex.getMessage());
|
||||
LOGGER.debug("Detailed stacktrace", new Object[]{ex});
|
||||
}
|
||||
|
||||
|
||||
Response errorResponse;
|
||||
if (ex instanceof APIException) {
|
||||
errorResponse = ((APIException) ex).getHttpResponse();
|
||||
@ -60,7 +61,7 @@ public class APIExceptionInterceptor {
|
||||
throw (ConstraintViolationException) ex.getCause();
|
||||
} else {
|
||||
errorResponse = new APIException(ex, locale).getHttpResponse();
|
||||
}
|
||||
}
|
||||
return errorResponse;
|
||||
}
|
||||
return proceedResponse;
|
||||
|
||||
Reference in New Issue
Block a user