[FEAT] add some Logs when fail
This commit is contained in:
parent
4236dc38bd
commit
274767d89b
@ -13,11 +13,12 @@ public class FailExceptionCatcher implements ExceptionMapper<FailException> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Response toResponse(final FailException exception) {
|
public Response toResponse(final FailException exception) {
|
||||||
LOGGER.warn("Catch FailException:");
|
LOGGER.warn("Catch FailException: {}", exception.getLocalizedMessage());
|
||||||
final RestErrorResponse ret = build(exception);
|
final RestErrorResponse ret = build(exception);
|
||||||
LOGGER.error("Error UUID={}", ret.uuid);
|
LOGGER.error("Error UUID={}", ret.uuid);
|
||||||
// Not display backtrace ==> this may be a normal case ...
|
if (exception.exception != null) {
|
||||||
// exception.printStackTrace();
|
exception.exception.printStackTrace();
|
||||||
|
}
|
||||||
return Response.status(exception.status).entity(ret).type(MediaType.APPLICATION_JSON).build();
|
return Response.status(exception.status).entity(ret).type(MediaType.APPLICATION_JSON).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user