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

Handle new-style Status error responses correctly #6263

Closed
rileykarson opened this issue May 1, 2020 · 3 comments
Closed

Handle new-style Status error responses correctly #6263

rileykarson opened this issue May 1, 2020 · 3 comments

Comments

@rileykarson
Copy link
Collaborator

rileykarson commented May 1, 2020

http://aip.dev/193 states that APIs should return errors as a Status message, including a standard set of details payloads. This gist is an example, from Cloud Run.

We parse errors using googleapi.CheckResponse, which returns the googleapi.Error format. While Status and googleapi.Error share code and message, they refer to their details as details and errors respectively. This lead to a series of Cloud Run issues where we returned useless error messages like "The request has errors" while extra information was available under details.

Interestingly, the generated service clients all use googleapi.CheckResponse as well, even for Cloud Run. I filed an issue against them as googleapis/google-api-go-client#473. It's likely that our best solution is to wait that fix out, however, this issue can be used to dedupe similar issues in the meantime.

@rileykarson
Copy link
Collaborator Author

rileykarson commented May 11, 2020

googleapis/google-api-go-client#473 has since been resolved. Judging by their average release cadence, in around a week, we can revendor those clients and close this out.

@danawillow danawillow added this to the Sprint 13 milestone May 11, 2020
@rileykarson
Copy link
Collaborator Author

https://github.com/googleapis/google-api-go-client/releases/tag/v0.24.0 is released including the change.

@ghost
Copy link

ghost commented Jun 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Jun 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants