FAQ | This is a LIVE service | Changelog

Skip to content

add retries to OAuth2 HTTP(S) requests

Add a configurable number of retry attempts when fetching tokens from the OAuth2 endpoint or when requesting resources authorised with OAuth2 tokens.

This uses requests' built-in retry behaviour which retries only in the face of network errors such as DNS failures or connection errors. It does not retry if data has made it to the server.

It is, unfortunately, non-trivial to write a test for this since faking a network error requires deeper knowledge of requests internals than I possess. We rely on the max_retries parameter behaving as documented.

Closes #52 (closed).

Merge request reports