googleapis / googleapis/google-cloud-node

Sometimes we don't return GoogleErrors

Open
#7,715 0 comments 0 reactions 2 assignees Claimed by @danieljbruce View on GitHub
library: google-cloud-node-core priority: p2 size: s type: bug
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.