Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: clean up grpc error handling and integration test for promote er…
…ror info field (#1110) Clean up googleError class Changes: 1. Add `errorInfoMetadata` placeholder for `errorInfo.metadata`, same as `errorInfo.reason`, `errorInfo.domain`. Replace previously add error info metadata key-value pair into the existing metadata. Reasons: * Because `metadata` occupied for gRPC metadata, we have to rename for ErrorInfo's metadata. * If add the key value in existing `metadata`, it is still hard for user figure out the which keys are from gRPC metadata, which keys are from ErrorInfo. 2. Wrapped the decoding in `GoogleError.parseGRPCStatusDetails`. Moved`caller.ts` to import GoogleErrorDecode, and handle the metadata key. 3. Add a [test](https://github.com/googleapis/gax-nodejs/pull/1110/files#diff-c147f17fee3db816a973dc2a49fe46717e6f0c1b29fe069c56cb4606a7862d57R209) for situation of `GoogleAdsFailure`. It also sent it in gRPC metadata. In gax, we still decode details ignore the `GoogleAdsFailure`.
- Loading branch information