Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.
This repository was archived by the owner on May 30, 2024. It is now read-only.

getFlagReason always undefined with allFlagsState response #235

Description

@ClementLevesque

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions