Skip to content

Pass GBError to refresh handler#109

Open
vazarkevych wants to merge 5 commits intomainfrom
feature/refresh-handler-error
Open

Pass GBError to refresh handler#109
vazarkevych wants to merge 5 commits intomainfrom
feature/refresh-handler-error

Conversation

@vazarkevych
Copy link
Copy Markdown
Collaborator

This PR adds GbError support to the RefreshHandler, allowing refresh issues to be tracked and reported through analytics.

Volodymyr Nazarkevych and others added 3 commits August 19, 2025 11:22
…er-error

# Conflicts:
#	test/common_test/sdk_builder_test.dart
# Conflicts:
#	lib/src/growth_book_sdk.dart
Comment thread lib/src/MultiUserMode/constant.dart Outdated
typedef FeatureUsageCallbackWithUser = void Function(String, GBFeatureResult);

typedef FeatureRefreshCallback = void Function(bool);
typedef FeatureRefreshCallback = void Function(bool, GBError?);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change. Let us do it with backwards compatibility

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have created V2 handlers (CacheRefreshHandlerV2, setRefreshHandlerV2) with GBError? support, while keeping original handlers as @Deprecated but fully functional. Old handlers are internally wrapped to work with the V2 implementation.

Note: FeatureRefreshCallback is not exposed to users in GBSDKBuilderApp - it's only stored internally in the Options class, so the deprecation there doesn't affect the public API surface.

Existing code works unchanged with deprecation warnings guiding migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants