-
Notifications
You must be signed in to change notification settings - Fork 6
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
(flagd) Return the provided default value in case of error #22
Comments
As discussed in #24 (comment), providers should rather raise in case of error, letting the SDK handle the error (and run necessary hooks). Then I guess it should probably be the responsibility of the SDK as well to craft a ResolutionDetail response with the default value in it. Does this make sense @beeme1mr ? |
Yes, exactly. |
Note at the moment, there is no error management in the SDK I believe: https://github.com/open-feature/ruby-sdk/blob/main/lib/open_feature/sdk/client.rb#L22-L36 Until hooks are properly implemented, the error will just bubble up |
@beeme1mr @maxveldink
|
Yeah, we're missing the appropriate handling of provider errors in the client. Would you mind opening an issue on the ruby-sdk repo to track this discussion? So, I think the error use case is already covered in the ResolutionDetails spec type. If the provider implementation knows about an error, it returns a We're not covering the case where an exception is thrown in a provider implementation (or any abnormal execution of a provider that does something that isn't spec-compliant). We must protect against that in the client and return a default value when the error fields are filled out. |
I've created an issue on the ruby-sdk repo |
Each flag resolution method's signature requires a
default_value
. Currently it isn't used by the flagd provider.It should be returned as value in case of error (here)
The text was updated successfully, but these errors were encountered: