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

run: Details in error message dropped by googleapi.CheckResponse #473

Closed
rileykarson opened this issue May 1, 2020 · 1 comment
Closed
Assignees
Labels
api: run Issues related to the Cloud Run API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@rileykarson
Copy link
Contributor

rileykarson commented May 1, 2020

I work on the Terraform Google Provider, where we often consume these generated service clients. We're using the googleapi.CheckResponse function to parse errors returned from GCP, however it's proved insufficient in this case.

The Cloud Run API returns a standard details object as defined by http://aip.dev/193. This gist provides an example error response I received. The details object isn't recognised, and only the shared fields (message / code) are properly parsed. Unfortunately, this API returns the string "The request has errors" as the message, resulting in the near-useless Error() string of googleapi: Error 400: The request has errors.

Given that this is now the standard error format per the AIP, I believe this library should parse the format into a useful error.

Original issue: hashicorp/terraform-provider-google#6099
Google-internal followup with Cloud Run: b/153896811

@codyoss codyoss added api: run Issues related to the Cloud Run API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels May 1, 2020
@codyoss
Copy link
Member

codyoss commented May 1, 2020

Thanks for the report! I have ran into debugging woes in the past as well with the error messages generated. I will check out the aip and see what we can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: run Issues related to the Cloud Run API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants