googleapis / googleapis/google-cloud-rust
Handle BigQuery storage errors
- Dominant language
- Rust
- Stars
- 955
- Forks
- 144
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 275
Description
Related to #4832
As @alvarowolfx points out, BigQuery may encode a [`StorageError`](
https://github.com/googleapis/googleapis/blob/a8598f68e1be76c31ac74f1cdcbe33fce642094d/google/cloud/bigquery/storage/v1/storage.proto#L702) in the error details. We need to make sure this gets preserved when converting between gRPC-generated types and our own types.
This can happen in two place.
1. Converting the status:
https://github.com/googleapis/google-cloud-rust/blob/266973f0504a3fb00a97b04aeb82beb70e5252ad/src/gax-internal/src/grpc/status.rs#L37
2. Converting protos with `rpc::Status` as a field:
https://github.com/googleapis/google-cloud-rust/blob/266973f0504a3fb00a97b04aeb82beb70e5252ad/src/bigquery-write/src/status.rs#L29
It will be tricky, because the conversion code lives in `gaxi`, and we typically do not want that code supporting service-specific types.
We will probably want to extend the interface to accept a custom set of names, `T`s, that a service can supply.
Contributor guide
Assessment
This issue has not been assessed yet.