Skip to content

IsFeatureEnabled and GetFeatureFlagPayload behave differently for mismatch #76

@andykellr

Description

@andykellr

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.

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