== Response.Status.BAD_REQUEST.getStatusCode()) {
LOG.error("Request failed: " + response.getClientResponseStatus().getStatusCode());
return (T) response.getEntity(method.getReturnType());
} else {
LOG.error("Request failed: " + response.getClientResponseStatus().getStatusCode());
throw new FalconException(response.getEntity(String.class));
}
} catch (Throwable e) {
LOG.error("Request failed", e);
throw new FalconException(e);
}
}