code: @Override
      public Response toResponse(JqmInvalidRequestException exception)
      {
          // String type = headers.getMediaType() == null ? MediaType.APPLICATION_JSON : headers.getMediaType().getType();
          ErrorDto d = new ErrorDto(exception.getMessage(), 10, exception, Status.BAD_REQUEST);
          return Response.status(Response.Status.BAD_REQUEST).entity(d).type(MediaType.APPLICATION_JSON).build();
      }
docs: private HttpHeaders headers;