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

refactor get flag to throw open feature errors and handle targeting key error #47

Closed
wants to merge 3 commits into from

Conversation

Billlynch
Copy link
Collaborator

@Billlynch Billlynch commented Nov 21, 2023

Hi There, I just made a Pull Request!

Currently we set default value, error code and error message manually in the providers, this can make reading the getFlag function more difficult. OpenFeature's SDK will catch OF errors and map these in the exact same way. So we can simplify the logic with these errors. This is pre-work to make apply logic easier to adjust in the near future.

Also added throwing invalid context error when confidence returns with a reason of targeting key error

✔️ Checklist

  • All tests are passing
  • Relevant documentation updated
  • linter/style run on changed files
  • Tests added for new functionality
  • Regression tests added for bug fixes
  • Tested in a corresponding example app

@Billlynch Billlynch changed the title refactor get flag to throw open feature errors refactor get flag to throw open feature errors and handle targeting key error Nov 21, 2023
Copy link
Member

@fabriziodemaria fabriziodemaria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, although to be more compliant to the OF specification we should probably address my comment?

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

Successfully merging this pull request may close these issues.

3 participants