request.setContentLoggingLimit(0);
request.setThrowExceptionOnExecuteError(false);
HttpResponse response = request.execute();
// check for an HTTP success response (2xx)
if (response.isSuccessStatusCode()) {
return response.parseAs(Response.class);
}
// On error, throw a ClientLoginResponseException with the parsed error details
ErrorInfo details = response.parseAs(ErrorInfo.class);
String detailString = details.toString();
StringBuilder message = HttpResponseException.computeMessageBuffer(response);