The control treatment is a reserved treatment in Split. You cannot create a treatment named control. The control treatment is returned by the SDK in the following scenarios:
-
The targeting rules for a feature flag are not defined. If you place your code behind a feature flag and push your code to production without defining the targeting rules for that feature flag in the user interface, the SDK does not have any information on the rules or even the possible treatments of this feature flag. In this scenario, the SDK returns the control treatment.
-
The SDK does not have the feature cached. If a feature flag's definition is not already cached and a treatment is evaluated for that feature flag, then the SDK returns control. The reasons this could happen are:
-
The SDK hasn't finished downloading the initial set of feature flag and segment definitions when
getTreatment
is called. This happens when callinggetTreatment
before SDK_READY event fires after initializing the SDK. -
A running SDK is asked to evaluate a newly defined feature flag, but the definition has not been cached.
-
-
The SDK encounters an exception. SDKs are designed to never throw exceptions or errors. If the SDK encounters an exception, it returns the control treatment.
Tip
When evaluating which treatment to show to a customer, we recommend handling the control treatment in the same way as the default treatment.
Comments
0 comments
Please sign in to leave a comment.