Skip to content

Retry requests on 401 or 500 errors

Thomas Kluyver requested to merge retry-401 into main

We're seeing an occasional issue where a newly issued Oauth token is rejected. This is meant to be a workaround: if we get a 401 error, wait 1 second and try again. Server errors (5xx) are also retried. For now, we only try twice.

I've inserted it at a layer where calls with and without Oauth will both be retried, so if exflcalproxy hits the same thing, it will be retried at the CalParrot layer. I haven't changed the logic of what CalParrot stores; 401 responses will still be saved and given to other notebooks in the same execution.

I spotted that the previous fix to increase the timeout only applied when using Oauth, not when going through exflcalproxy, so I've made that the same for both cases.

@schmidtp @ahmedk @manettim

Merge request reports