List of usage examples for com.fasterxml.jackson.databind JsonMappingException printStackTrace
public void printStackTrace(PrintStream s)
From source file:org.jaqpot.core.service.filter.excmappers.JsonMappingExceptionMapper.java
@Override public Response toResponse(JsonMappingException exception) { LOG.log(Level.INFO, "JaqpotNotAuthorizedExceptionMapper exception caught", exception); StringWriter sw = new StringWriter(); exception.printStackTrace(new PrintWriter(sw)); String details = sw.toString(); ErrorReport error = ErrorReportBuilder.builderRandomId().setCode("JsonMappingError") .setMessage(exception.getMessage()).setDetails(details).setHttpStatus(400).build(); return Response.ok(error, MediaType.APPLICATION_JSON).status(Response.Status.BAD_REQUEST).build(); }