return response;
} else {
return handleError(response);
}
}
<BUG>private <T> T handleError(Response response) {
return throwProblem(response.statusCode(),
jsonSupport.fromJson(response.responseBody().asString(), Problem.class));
}</BUG>
private <T> T throwProblem(int code, Problem problem) {

return response;
} else {
return handleError(response);
}
}
private <T> T handleError(Response response) {
String raw = response.responseBody().asString();
Problem problem = Optional.ofNullable(jsonSupport.fromJson(raw, Problem.class))
.orElse(Problem.noProblemo("no problem sent back from server", "", response.statusCode()));
return throwProblem(response.statusCode(),
problem);
}
private <T> T throwProblem(int code, Problem problem) {
