Is this a support request? No.
Describe the bug
The method allFlagsState returns a Promise resolved by an object on which getFlagReason(key) returns always undefined :
constflagsState=awaitfeatureFlagClientInt.allFlagsState({ key });// flagsState.getFlagReason(key) === undefined// flagsState.allValues() & flagsState.getFlagValue() are ok Whereas featureDetail which returns the proper object :
const{ reason, value }=awaitfeatureFlagClientInt.featureDetail(featureKey,{ key },false);// reason.kind === 'OFF' || 'RULE_MATCH' etc.To reproduce
- Create a feature flag in the dashboard
- Instanciate the LaunchDarklyClient
- Call allFlagsState on that client
Expected behavior
getFlagReason should return a LDEvaluationReason object type.
Logs
See above.
SDK version
Current sdk version: launchdarkly-node-server-sdk: "5.13.4"
Language version, developer tools
NodeJS 16.1.0
OS/platform
On local env, Mac book pro M1.
Additional context
Add any other context about the problem here.
Is this a support request? No.
Describe the bug
The method
allFlagsStatereturns a Promise resolved by an object on whichgetFlagReason(key)returns alwaysundefined:Whereas featureDetail which returns the proper object :
To reproduce
Expected behavior
getFlagReasonshould return aLDEvaluationReasonobject type.Logs
See above.
SDK version
Current sdk version: launchdarkly-node-server-sdk: "5.13.4"
Language version, developer tools
NodeJS 16.1.0
OS/platform
On local env, Mac book pro M1.
Additional context
Add any other context about the problem here.