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

[FEATURE] Support Returning Error Resolutions from Providers #307

Open
toddbaert opened this issue Oct 4, 2024 · 1 comment
Open

[FEATURE] Support Returning Error Resolutions from Providers #307

toddbaert opened this issue Oct 4, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@toddbaert
Copy link
Member

Requirements

As of right now, the OpenFeature .NET SDK doesn't properly handle returning error resolutions; when a provider returns an erroneous evaluation by setting the errotType, the error hooks do not run, and for many purposes, the evaluation appears to have succeeded.

In other SDKs, we've made changes to check the resolution details and if the errorType is set (or anything but ErrorType.None in the case of this SDK) we then behave similarly to if something was thrown. We don't currently do this in the .NET SDK. This isn't ideal, since exceptions are generally bad for control flow and are expensive.

To resolve this:

  • after evaluation, check if the errorType is not ErrorType.None, and if not, behave as if the provider threw an Exception by:
    • running the error hooks
    • setting the error message (the description of the ErrorType would be fine)
    • NOT running the after hooks
  • add associated tests
@toddbaert toddbaert added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Oct 4, 2024
@chrfwow
Copy link

chrfwow commented Nov 22, 2024

I would like to this issue over. Could you please assign me @toddbaert ?

@beeme1mr beeme1mr removed the help wanted Extra attention is needed label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants