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

Have /decide include disabled flag keys mapping to null #26948

Open
havenbarnes opened this issue Dec 16, 2024 · 1 comment
Open

Have /decide include disabled flag keys mapping to null #26948

havenbarnes opened this issue Dec 16, 2024 · 1 comment
Assignees

Comments

@havenbarnes
Copy link
Contributor

Our docs mention that disabled flags will return as either null or undefined (https://posthog.com/docs/feature-flags/creating-feature-flags#enable-feature-flag). In reality /decide will simply not include these keys at all (which is technically equivalent to undefined after HTTP transport). It would be more useful for clients to see these keys mapped to null every time, so that SDK users can differentiate between a disabled flag and non-existent flag / posthog error response.

@havenbarnes havenbarnes self-assigned this Dec 16, 2024
@benjackwhite
Copy link
Contributor

One thing to consider - people might purposefully want it this way. So that they don't show flag keys that the user shouldn't have access to.

I can't think of a super strong reason why but simply showing all keys might not be what's wanted 🤷

Also many older SDKs don't check the value, they just grab the keys instead. Would need to be sure to make this a version change to the api (or maybe even just make this part of the new flags service instead)

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

2 participants