Repository navigation
fix: Prevent allFlagsState from throwing when retrieving flags fails - #294
Merged
Merged
Conversation
jsonbailey
approved these changes
Nov 10, 2026
keelerm84
pushed a commit
that referenced
this pull request
Nov 10, 2026
🤖 I have created a release *beep* *boop* --- ## [6.12.1](6.12.0...6.12.1) (2026-11-10) ### Bug Fixes * Include the big segments status on evaluation reasons for failed evaluations ([#292](#292)) ([2f2b1fe](2f2b1fe)) * Include the HTTP status in exceptions on evaluation reasons ([#291](#291)) ([52d3303](52d3303)) * Make TestData valueForAll return its value when targeting is off ([#288](#288)) ([b8a9522](b8a9522)) * Prevent allFlagsState from throwing when retrieving flags fails ([#294](#294)) ([2b65bf2](2b65bf2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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
LDClient::allFlagsState()only caughtUnrecoverableHTTPStatusExceptionfrom the feature requester. Any other error, such as a network failure, a persistent store failure, or an exception from a customFeatureRequester, escaped to the caller. Evaluation methods should not throw, and other SDKs return an invalid state here.allFlagsState()now catches anyThrowablefromgetAllFeatures(), logs it at error level, and returns an invalidFeatureFlagsState. Unrecoverable HTTP errors still take the client offline.Note
Overview
LDClient::allFlagsState()no longer lets failures fromFeatureRequester::getAllFeatures()bubble up. BesidesUnrecoverableHTTPStatusException(still puts the client offline), it now catches anyThrowable, logs viaUtil::logExceptionAtErrorLevel, and returns an invalidFeatureFlagsState, matching single-flag evaluation and other SDKs.Tests cover
RuntimeException/Error(invalid state, empty map, error log, client stays online) and unrecoverable HTTP onallFlagsState(client offline on later calls).Reviewed by Cursor Bugbot for commit d57af57. Bugbot is set up for automated code reviews on this repo. Configure here.