Merged
requested to merge github/fork/hugo-ma-alves/feature/feign-try-to-renew-access-token-on-error into master
Created by: hugo-ma-alves
Hello
This PR adds the capability of automatically retry the requests that fail due to a 401 or 403. Sometimes these errors indicate that the token has expired. This may happen if we have a valid token in memory, but it expires before the request is sent. After reaching the server the request will fail either with a 401 or 403.
For this case the Feign client will renew the token and retry to send the request one more time. If it fails on the second attempt it thrown an exception as before.
PR checklist
-
Read the contribution guidelines. -
Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community. -
Run the following to build the project and update samples: ./mvnw clean package ./bin/generate-samples.sh ./bin/utils/export_docs_generators.sh
./bin/generate-samples.sh bin/configs/java*
. For Windows users, please run the script in Git BASH. -
File the PR against the correct branch: master
,5.3.x
,6.0.x
-
If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.
@bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) @nmuesch (2021/01)