`AttributeError` when error is a string in `retry.py`
Closed this issue · 2 comments
keunhong commented
It seems like in rare cases GCS returns a string in the "error"
field rather than a JSON object here:
Line 101 in c7cf66d
This causes an attribute error here:
Line 22 in c7cf66d
File "[...]/lib/python3.10/site-packages/gcsfs/retry.py", line 21, in __init__
self.code = error_response.get("code", None)
AttributeError: 'str' object has no attribute 'get'
This happens very rarely and I haven't been able to log exactly what is returned by Google in this case.
martindurant commented
Would you like to make a PR with an isinstance
on this line?
keunhong commented
Would you like to make a PR with an
isinstance
on this line?
Will do!