run: Details in error message dropped by googleapi.CheckResponse #473
Labels
api: run
Issues related to the Cloud Run API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
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 ofgoogleapi: 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
The text was updated successfully, but these errors were encountered: