You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
google-api-core: non-object REST error members mask HTTP failures with AttributeError #19253
AttributeError: 'NoneType' object has no attribute 'get'
The crash occurs at payload.get("error", {}).get("message", "unknown error") in format_http_response_error. Non-object error members (such as a string) and non-object top-level JSON values also trigger attribute errors.
Expected
Error decoding should return the exception selected by the HTTP status (ServiceUnavailable for 503 / TooManyRequests for 429), with the original response attached and the existing unknown error fallback when a standard error object is unavailable. An error-envelope shape should not replace a retryable HTTP failure with AttributeError.
Proposed Scope
Normalize the top-level payload and its error member to mappings before reading standard fields. Preserve existing valid dictionary payloads, structured details, and the list-wrapper behavior added in #18232. This issue concerns non-object payloads / error members, not the already-fixed list-wrapper case.
Activity