}
if (ret == null && response != null) {
if (response.getHttpStatusCode() != HttpResponse.SC_OK) {
final OAuth2Message msg = this.oauth2MessageProvider.get();
msg.parseJSON(response.getResponseAsString());
if (msg.getError() != null) {
ret = new OAuth2HandlerError(msg.getError(), "error exchanging code for access_token",
null, msg.getErrorUri(), msg.getErrorDescription());
}
}