cloud-sdk-java
cloud-sdk-java copied to clipboard
chore: Enhance HttpClient5 Retry-Strategy for 429 and 503 responses
Context
Related https://github.com/SAP/cloud-sdk-java/pull/1004
- [x] I opened this PR to document our decision for approval / dismissal. In case this comes up again in the future.
- [x] We aligned to keep the current behavior of HttpClient5 but add logging to it.
Log message written to debug:
cloudplatform/connectivity-apache-httpclient5/src/test/java/com/sap/cloud/sdk/cloudplatform/connectivity/DefaultApacheHttpClient5FactoryTest.java
[main] DEBUG com.sap.cloud.sdk.cloudplatform.connectivity.DefaultApacheHttpClient5Factory - Retrying request for destination null due to response 429. Retry attempt #1.
[main] DEBUG com.sap.cloud.sdk.cloudplatform.connectivity.DefaultApacheHttpClient5Factory - Retrying request for destination null due to response 503. Retry attempt #1.