fix: Evaluate retryCondition for transient network-level errors#228
Merged
Conversation
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
harshitha-cstk
approved these changes
May 21, 2026
netrajpatel
approved these changes
May 21, 2026
reeshika-h
approved these changes
May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes Delivery SDK retry behavior for transient network-level failures and wires up retryDelayOptions.customBackoff in the core retry handler.
Problem
In retryResponseErrorHandler, errors without an HTTP response (error.response is undefined) were rethrown immediately. That skipped retryCondition, so codes like ETIMEDOUT, ECONNRESET, and EPIPE were never retried even when customers configured a custom retryCondition in StackConfig.
retryDelayOptions.customBackoff was exposed on HttpClientParams but not used when computing retry delays.
Solution
Impact
Improves reliability for long-lived connections behind proxies, load balancers, and CDNs, including intermittent timeouts reported on Azure, without requiring custom axios interceptors.
Version
1.4.0 — May 25, 2026
Test plan
Unit tests for ETIMEDOUT, ECONNRESET, EPIPE, ECONNABORTED + retryCondition
Unit tests for customBackoff delay
Existing rate-limit (x-ratelimit-remaining) and 429/401 retry tests pass
Publish @contentstack/core@1.4.0 and bump @contentstack/delivery-sdk dependency