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
This way we can capture the entire state of the error to determine.
Also worth doing: Including the entire error response in the returned object. This way, in cases like the 503 error in #2093 where the JSON payload isn't what our code expects. Things still work fine.
This way we can capture the entire state of the error to determine.
Also worth doing: Including the entire error response in the returned object. This way, in cases like the 503 error in #2093 where the JSON payload isn't what our code expects. Things still work fine.
In that case, the 503 payload is
{ "error": { "code": 503, "message": "Write collision, please retry.", "status": "UNAVAILABLE", "details": [ { "@type": "type.googleapis.com/google.rpc.RetryInfo", "retryDelay": "1.000s" } ] } }This seems to be a JSON version of the
google.rpc.status.Statusprotobuf message type, with an extrastatusfield that looks like agoogle.rpc.code.Code.Our error-payload-parsing code makes the assumption that the errors come in the form:
{ "error": { "message": "...", "errors": [ "..." ] }, "...": "..." }