Skip to content

Commit 3434a91

Browse files
Merge pull request #415 from splitio/enhanced_proxy_fallback
Enhanced proxy fallback
2 parents ab85720 + 2fffacb commit 3434a91

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2.4.1 (June 3, 2025)
2+
- Bugfix - Improved the Proxy fallback to flag spec version 1.2 to handle cases where the Proxy does not return an end-of-stream marker in 400 status code responses.
3+
14
2.4.0 (May 27, 2025)
25
- Added support for rule-based segments. These segments determine membership at runtime by evaluating their configured rules against the user attributes provided to the SDK.
36
- Added support for feature flag prerequisites. This allows customers to define dependency conditions between flags, which are evaluated before any allowlists or targeting rules.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splitsoftware/splitio-commons",
3-
"version": "2.4.0",
3+
"version": "2.4.1",
44
"description": "Split JavaScript SDK common components",
55
"main": "cjs/index.js",
66
"module": "esm/index.js",

src/sync/polling/fetchers/splitChangesFetcher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export function splitChangesFetcherFactory(fetchSplitChanges: IFetchSplitChanges
4040
}
4141

4242
let splitsPromise = fetchSplitChanges(since, noCache, till, settings.sync.flagSpecVersion === FLAG_SPEC_VERSION ? rbSince : undefined)
43-
// Handle proxy error with spec 1.3
4443
.catch((err) => {
45-
if (err.statusCode === 400 && sdkEndpointOverridden(settings) && settings.sync.flagSpecVersion === FLAG_SPEC_VERSION) {
44+
// Handle proxy error with spec 1.3
45+
if ((!err.statusCode || err.statusCode === 400) && sdkEndpointOverridden(settings) && settings.sync.flagSpecVersion === FLAG_SPEC_VERSION) {
4646
log.error(LOG_PREFIX_SYNC_SPLITS + 'Proxy error detected. Retrying with spec 1.2. If you are using Split Proxy, please upgrade to latest version');
4747
lastProxyCheckTimestamp = Date.now();
4848
settings.sync.flagSpecVersion = '1.2'; // fallback to 1.2 spec

0 commit comments

Comments
 (0)