log_id when available; retain it when reporting a failed request.
Read the error safely
Depending on the response path, the error text can appear inmessage or msg, and code can be a string or number. Use HTTP status as the primary success check.
Retry policy
Retry transient failures with an increasing delay and jitter, and set a maximum attempt count. A daily quota error requires waiting until the next automatic reset; repeated immediate retries will not restore allowance. When reporting a problem, include the HTTP status, time in UTC, andlog_id. Do not share your API key.
