googleapis / googleapis/google-cloud-node
Sometimes we don't return GoogleErrors
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 712
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 99
Description
While investigating error handling from this doc: https://docs.google.com/document/d/1UOj7Eo3xdMK1pxtt-cw3z0mAXEHnx1icb6XsADSthiU/edit?resourcekey=0-Pns_E0nx5cMD_7l6QgtX6g&tab=t.0, I realized we don't return errors typed GoogleError through grpc. Importantly, this line: https://github.com/googleapis/gax-nodejs/blob/2d0cb036040ce7d02d2dd941a4dd82543323f6c5/gax/src/call.ts#L128 doesn't actually make this into a GoogleError (it actually expects a GoogleError - see https://github.com/googleapis/gax-nodejs/blob/2d0cb036040ce7d02d2dd941a4dd82543323f6c5/gax/src/googleError.ts#L35). We should create a new error, like so: https://github.com/googleapis/gax-nodejs/blob/2d0cb036040ce7d02d2dd941a4dd82543323f6c5/gax/src/googleError.ts#L89
Contributor guide
Assessment
This issue has not been assessed yet.