Errors in sign_bytes are not clear #851
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.
Is your feature request related to a problem? Please describe.
When there is an error in the request made in the function sign_bytes is not clear what the real error is. It is just throwing a
KeyError: 'signedBlob'
:Describe the solution you'd like
It would be great to have a more clear understanding of the real error. In my case the response was returning
One option is to validate the response (
response.json()
), before returning thesignedBlob
. Similar to https://github.com/googleapis/google-auth-library-python/blob/main/google/auth/iam.py#L79The text was updated successfully, but these errors were encountered: