Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.yammer.dropwizard.jersey;
 
 
    private static final Logger LOGGER = LoggerFactory.getLogger(InvalidEntityExceptionMapper.class);
    private static final int UNPROCESSABLE_ENTITY = 422;
    @Context
    private HttpServletRequest request;
    private final UnbrandedErrorHandler errorHandler = new UnbrandedErrorHandler();
    @Override
    public Response toResponse(InvalidEntityException exception) {
        final StringWriter writer = new StringWriter(4096);
        try {
            .writeValidationErrorPage(writerexception);
        } catch (IOException e) {
            .warn("Unable to generate error page"e);
        }
        return Response.status()
                       .type(.)
                       .entity(writer.toString())
                       .build();
    }
New to GrepCode? Check out our FAQ X