diff options
-rw-r--r-- | src/buildtool/execution_api/remote/bazel/bazel_execution_client.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_execution_client.cpp b/src/buildtool/execution_api/remote/bazel/bazel_execution_client.cpp index 3b95a8ff..735f3b45 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_execution_client.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_execution_client.cpp @@ -57,7 +57,10 @@ auto BazelExecutionClient::ReadExecution( grpc::ClientReader<google::longrunning::Operation>* reader, bool wait) -> std::optional<google::longrunning::Operation> { if (reader == nullptr) { - // TODO(vmoreno): log error + LogStatus( + &logger_, + LogLevel::Error, + grpc::Status{grpc::StatusCode::UNKNOWN, "Reader unavailable"}); return std::nullopt; } @@ -65,7 +68,7 @@ auto BazelExecutionClient::ReadExecution( if (not reader->Read(&operation)) { grpc::Status status = reader->Finish(); // TODO(vmoreno): log error using data in status and operation - LogStatus(&logger_, LogLevel::Debug, status); + LogStatus(&logger_, LogLevel::Error, status); return std::nullopt; } // Important note: do not call reader->Finish() unless reader->Read() @@ -76,7 +79,7 @@ auto BazelExecutionClient::ReadExecution( grpc::Status status = reader->Finish(); if (not status.ok()) { // TODO(vmoreno): log error from status and operation - LogStatus(&logger_, LogLevel::Debug, status); + LogStatus(&logger_, LogLevel::Error, status); return std::nullopt; } } |