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

fix: add actionable errors for GCE long running operations #498

Merged
merged 8 commits into from Jun 12, 2023

Conversation

parthea
Copy link
Collaborator

@parthea parthea commented May 19, 2023

Fixes b/280938007

Googlers see go/surface-actionable-errors-lro-gce

When an error occurs during an extended operation when using the python compute client, currently users only receive the error code and the error message, which is not helpful.

google.api_core.exceptions.BadRequest: 400 BAD REQUEST

The proposed solution is to provide users with actionable error information, surfacing the errors field which contains actionable errors.

google.api_core.exceptions.BadRequest: 400 BAD REQUEST
INCOMPATIBLE_BACKEND_SERVICES: Validation failed for instance group 'projects/<REDACTED>/zones/us-central1-a/instanceGroups/my-instance-group-1': backend services 'projects/<REDACTED>/global/backendServices/my-backend-service-1' and 'projects/<REDACTED>global/backendServices/my-backend-service-2' point to the same instance group but the backends have incompatible balancing_mode. Values should be the same.

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label May 19, 2023
@parthea parthea force-pushed the add-actionable-errors-lro branch 2 times, most recently from 50b5a79 to 254e151 Compare May 19, 2023 17:04
@parthea parthea force-pushed the add-actionable-errors-lro branch from 254e151 to 0e3f9bd Compare May 19, 2023 18:44
Copy link
Collaborator Author

@parthea parthea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add tests if go/surface-actionable-errors-lro-gce is approved.

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Jun 1, 2023
@parthea parthea marked this pull request as ready for review June 1, 2023 14:34
@parthea parthea requested review from a team as code owners June 1, 2023 14:34
@parthea parthea enabled auto-merge (squash) June 12, 2023 15:58
@parthea parthea merged commit 7dfc3a7 into main Jun 12, 2023
22 checks passed
@parthea parthea deleted the add-actionable-errors-lro branch June 12, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants