iterative / iterative/PyDrive2

retries for failed API requests

Open
#41 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
670
Forks
75
PR merge metrics
No merged PRs in 30d

Description

Currently, pydrive2 uses googleapiclient for all Drive API operations, but doesn't retry any failed requests. However, the Drive API [recommends retries with exponential backoff](https://developers.google.com/drive/api/v3/handle-errors) for many errors, and [googleapiclient supports retries](https://github.com/googleapis/google-api-python-client/blob/c482712935d1c1331e33bd7f9968bd3b2be223bb/googleapiclient/http.py#L846) for all requests.

Would it be possible to add retry behavior as per the Drive API recommendations?

(Additionally, it'd be great to add this for the [initial client creation](https://github.com/iterative/PyDrive2/blob/c739ba379e4c656da5e229a21c39a4d621ada09b/pydrive2/auth.py#L610-L612), as the discovery service can also throw 500s.)

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.