| Index: components/proximity_auth/cryptauth/cryptauth_api_call_flow.cc
|
| diff --git a/components/proximity_auth/cryptauth/cryptauth_api_call_flow.cc b/components/proximity_auth/cryptauth/cryptauth_api_call_flow.cc
|
| index 399b949200f1d311b3c16332abe2716ad6a4c7d9..570075656674d1294236b7c71387fcf3fc90a950 100644
|
| --- a/components/proximity_auth/cryptauth/cryptauth_api_call_flow.cc
|
| +++ b/components/proximity_auth/cryptauth/cryptauth_api_call_flow.cc
|
| @@ -11,7 +11,7 @@ namespace proximity_auth {
|
|
|
| namespace {
|
|
|
| -const char kNoResponseBodyError[] = "No response body";
|
| +const char kResponseBodyError[] = "Failed to get response body";
|
| const char kRequestFailedError[] = "Request failed";
|
| const char kHttpStatusErrorPrefix[] = "HTTP status: ";
|
|
|
| @@ -50,9 +50,8 @@ std::string CryptAuthApiCallFlow::CreateApiCallBodyContentType() {
|
| void CryptAuthApiCallFlow::ProcessApiCallSuccess(
|
| const net::URLFetcher* source) {
|
| std::string serialized_response;
|
| - if (!source->GetResponseAsString(&serialized_response) ||
|
| - serialized_response.empty()) {
|
| - error_callback_.Run(kNoResponseBodyError);
|
| + if (!source->GetResponseAsString(&serialized_response)) {
|
| + error_callback_.Run(kResponseBodyError);
|
| return;
|
| }
|
| result_callback_.Run(serialized_response);
|
|
|