Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes we don't return GoogleErrors #1603

Open
sofisl opened this issue May 21, 2024 · 0 comments
Open

Sometimes we don't return GoogleErrors #1603

sofisl opened this issue May 21, 2024 · 0 comments
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@sofisl
Copy link
Contributor

sofisl commented May 21, 2024

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:

rejectCallback(GoogleError.parseGRPCStatusDetails(err));
doesn't actually make this into a GoogleError (it actually expects a GoogleError - see
static parseGRPCStatusDetails(err: GoogleError): GoogleError {
). We should create a new error, like so:
const error = Object.assign(

@sofisl sofisl added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels May 21, 2024
@sofisl sofisl self-assigned this May 21, 2024
@danieljbruce danieljbruce self-assigned this May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants