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

feat: add option for get gate with default value #22

Closed
liran2000 opened this issue Feb 22, 2024 · 2 comments
Closed

feat: add option for get gate with default value #22

liran2000 opened this issue Feb 22, 2024 · 2 comments

Comments

@liran2000
Copy link

* similar to GO sdk issue

Background
In continue of OpenFeature PR, it is a common practice to evaluate a boolean/gate with a default value:

client.getBooleanValue("non-existing", true)

Problem

BooleanEvaluation with default value true cannot fallback to true.
On scenarios such as get gate of non-existing gate, statsig returns false without indication of whether it was successful get gate or some error reason. Therefore, the evaluation will be evaluated to false in this case.

Suggested solution

add:

Statsig.checkGateAsync(user, key, boolean fallback);

@xinlili-statsig

@weihao-statsig
Copy link
Contributor

We've added a new API(which will return the evaluation details regarding a gate) for this. Please take a look. https://github.com/statsig-io/java-server-sdk/releases/tag/v1.14.0

@liran2000
Copy link
Author

We've added a new API(which will return the evaluation details regarding a gate) for this. Please take a look. https://github.com/statsig-io/java-server-sdk/releases/tag/v1.14.0

Thanks. The request of fallback was not added exactly as requested, so managed to overcome it via specific reasons check.

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

No branches or pull requests

2 participants