Kami / python-yubico-client

Python library for validating Yubico Yubikey One Time Passwords (OTPs) based on the validation protocol version 2.0.
https://yubico-client.readthedocs.org/en/latest/
Other
82 stars 19 forks source link

Retry server errors that might work on a retry #30

Closed nrw505 closed 4 years ago

nrw505 commented 4 years ago

Proxy and gateway timeouts can result in a NO_VALID_ANSWERS response.

When these are an HTTP status code that indicates something might work on retry, retry those requests.

codecov-io commented 4 years ago

Codecov Report

Merging #30 into master will increase coverage by 0.48%. The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #30      +/-   ##
==========================================
+ Coverage   84.06%   84.54%   +0.48%     
==========================================
  Files           6        6              
  Lines         483      498      +15     
  Branches       76       78       +2     
==========================================
+ Hits          406      421      +15     
  Misses         55       55              
  Partials       22       22
Impacted Files Coverage Δ
tests/test_yubico.py 88.12% <100%> (+0.24%) :arrow_up:
yubico_client/yubico.py 83.17% <100%> (+0.94%) :arrow_up:
Kami commented 4 years ago

Thanks for the contribution.

Change seems reasonable to me :+1:

Kami commented 4 years ago

I merged this into master and made a couple of small changes (e3a26496eb6bbba8858d74afa0705aed4c8010cf, df9dc518ac50b28ee177252df432c61b21481a5f).

I will look into publishing a new version to PyPi in the near future.