{"action":"created","issue":{"url":"https://api.github.com/repos/dropbox/dropbox-sdk-python/issues/39","labels_url":"https://api.github.com/repos/dropbox/dropbox-sdk-python/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/dropbox/dropbox-sdk-python/issues/39/comments","events_url":"https://api.github.com/repos/dropbox/dropbox-sdk-python/issues/39/events","html_url":"https://github.com/dropbox/dropbox-sdk-python/issues/39","id":123881044,"number":39,"title":"Limiting retries due to rate-limited requests, and determining the suggested backoff.","user":{"login":"vinodc","id":616742,"avatar_url":"https://avatars.githubusercontent.com/u/616742?v=3","gravatar_id":"","url":"https://api.github.com/users/vinodc","html_url":"https://github.com/vinodc","followers_url":"https://api.github.com/users/vinodc/followers","following_url":"https://api.github.com/users/vinodc/following{/other_user}","gists_url":"https://api.github.com/users/vinodc/gists{/gist_id}","starred_url":"https://api.github.com/users/vinodc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinodc/subscriptions","organizations_url":"https://api.github.com/users/vinodc/orgs","repos_url":"https://api.github.com/users/vinodc/repos","events_url":"https://api.github.com/users/vinodc/events{/privacy}","received_events_url":"https://api.github.com/users/vinodc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-25T13:20:16Z","updated_at":"2016-01-29T23:19:03Z","closed_at":null,"body":"It would be preferable to avoid the potential infinite loop here on 429 errors: https://github.com/dropbox/dropbox-sdk-python/blob/002e6df32a6c9446554f6f53b2510d284adc9943/dropbox/dropbox.py#L259\r\nCould there be some mechanism to separately control the number of retries for rate-limited requests? I would prefer our implementation to retry on 5** errors, but immediately fail on 429 errors providing me with an option on when to retry based on the Retry-After header in the response.\r\n\r\nI believe this would also require the TODO item at https://github.com/dropbox/dropbox-sdk-python/blob/002e6df32a6c9446554f6f53b2510d284adc9943/dropbox/dropbox.py#L329 to be implemented, storing the backoff value based on the Retry-After header, unless I'm mistaken."},"comment":{"url":"https://api.github.com/repos/dropbox/dropbox-sdk-python/issues/comments/177013948","html_url":"https://github.com/dropbox/dropbox-sdk-python/issues/39#issuecomment-177013948","issue_url":"https://api.github.com/repos/dropbox/dropbox-sdk-python/issues/39","id":177013948,"user":{"login":"braincore","id":4674965,"avatar_url":"https://avatars.githubusercontent.com/u/4674965?v=3","gravatar_id":"","url":"https://api.github.com/users/braincore","html_url":"https://github.com/braincore","followers_url":"https://api.github.com/users/braincore/followers","following_url":"https://api.github.com/users/braincore/following{/other_user}","gists_url":"https://api.github.com/users/braincore/gists{/gist_id}","starred_url":"https://api.github.com/users/braincore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/braincore/subscriptions","organizations_url":"https://api.github.com/users/braincore/orgs","repos_url":"https://api.github.com/users/braincore/repos","events_url":"https://api.github.com/users/braincore/events{/privacy}","received_events_url":"https://api.github.com/users/braincore/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T23:19:03Z","updated_at":"2016-01-29T23:19:03Z","body":"A new parameter, `max_retries_on_rate_limit`, has been introduced. You can set it to zero to eliminate automatic retrying on 429s: http://dropbox-sdk-python.readthedocs.org/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.__init__"}}