Hi <@U07ELDFKER3> The fix is now available in 1.0....
# sdk-swift
p
Hi @late-ambulance-66508 The fix is now available in 1.0.97 - it restores the refreshHandler call after a remote feature fetch failure. Please update and let us know if it resolves the issue on your end.
l
Thanks! I've seen it already and passed to our developers, will check!
🙌 1
Hi @powerful-spoon-16837 It seems HTTP 304 Not Modified is currently treated as a fetch failure. Here are the results of my investigation via LLMs:
- the SDK sends
If-None-Match
for feature requests
- when the server returns
304
,
NetworkClient
turns it into an error: “Not Modified - Use cached data”
-
FeaturesViewModel
then goes through the failure path and falls back to cached features
-
GrowthBookSDK
reports this via
refreshHandler(.failedToFetchData)
So from the app side, feature delivery is effectively OK because cached features are reused, but the refresh is still reported as an error.
This causes false-positive error analytics and can also trigger unnecessary retry logic. Also, the original HTTP 304 seems to get collapsed into generic
.failedToFetchData
, so integrators can’t distinguish “not modified, cache still valid” from a real network failure.
Relevant code:
- NetworkClient: https://github.com/growthbook/growthbook-swift/blob/1.0.97/Sources/CommonMain/Network/NetworkClient.swift#L54-L105
- FeaturesViewModel: https://github.com/growthbook/growthbook-swift/blob/1.0.97/Sources/CommonMain/Features/FeaturesViewModel.swift#L97-L109
- GrowthBookSDK: https://github.com/growthbook/growthbook-swift/blob/1.0.97/Sources/CommonMain/GrowthBookSDK.swift#L525-L528
đź‘€ 1
i.e. with such requests I see
failedToFetchData
events
đź‘€ 1
p
Hi Thanks for bringing this up. We'll take a look and get back to you as soon as possible🙌
Hi again @late-ambulance-66508 We have prepared a fix for this issue. After review, we'll make a release and let you know when it will be available
l
Great, thanks!
p
Hi @late-ambulance-66508 The fix is available in 1.1.2 version
l
Hi @powerful-spoon-16837 Thanks!