Skip to content

Commit ce70c7d

Browse files
authored
fix(bigtable): safely handle error states in metadata retrieval (#16225)
1 parent 7da8e2d commit ce70c7d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

google/cloud/bigtable/internal/data_connection_impl.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ class QueryPlanRefreshingPartialResultSource
10261026
}
10271027

10281028
std::optional<google::bigtable::v2::ResultSetMetadata> Metadata() override {
1029-
if (!source_.has_value()) return std::nullopt;
1029+
if (!source_.has_value() || !source_->ok()) return std::nullopt;
10301030
return (**source_)->Metadata();
10311031
}
10321032

0 commit comments

Comments
 (0)