Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsFeatureEnabled and GetFeatureFlagPayload behave differently for mismatch #76

Open
andykellr opened this issue Sep 23, 2024 · 0 comments

Comments

@andykellr
Copy link

With OnlyEvaluateLocally: true set on the FeatureFlagPayload and no match for the provided payload,

IsFeatureEnabled will return false, nil

GetFeatureFlagPayload will return "", errors.New("unable to compute flag locally")

I would expect GetFeatureFlagPayload to return an empty payload and either no error or a known error, something like NoMatchError.

At least I would suggest documenting that GetFeatureFlagPayload will return an error if there is no match. The error unable to compute flag locally suggests that it was unable to compute the flag locally, not that it didn't match the rule.

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

No branches or pull requests

1 participant