"failed to parse JSON object: entity stream is empty");
return JsonUtils.parseJsonString(entity);
} catch (IllegalArgumentException e) {
// produce a 400 http response
throw new WebApplicationException(e, Response
.status(Status.BAD_REQUEST).entity(new ErrorType(e))
.build());
} catch (JsonParseException e) {
// produce a 400 http response
throw new WebApplicationException(e, Response
.status(Status.BAD_REQUEST).entity(new ErrorType(e))
.build());
}
}