@Override
    public Response toResponse(IllegalArgumentException data) {
        ErrorBean error = new ErrorBean();
        error.setType(data.getClass().getSimpleName());
        error.setErrorCode(Status.BAD_REQUEST.getStatusCode());
        error.setMessage("A provided parameter could not be accepted: " + data.getMessage());
        // error.setMoreInfoUrl(data);
        // error.setStacktrace(getStackTrace(data));
        ResponseBuilder builder = Response.status(Status.BAD_REQUEST)
                .header("X-Apiman-Error", "true");
        builder.type(MediaType.APPLICATION_JSON_TYPE);
        log.error(data, data.getMessage());
        return builder.entity(error).build();
    }
@author Marc Savy {@literal <marc@blackparrotlabs.io>}
manager/api/exceptions/src/main/java/io/apiman/manager/api/rest/exceptions/mappers/IllegalArgumentExceptionMapper.java