-
Notifications
You must be signed in to change notification settings - Fork 18
Flag to prevent exception? #100
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
Comments
Hi @agardnerIT, thanks for reporting this. I'm pretty sure the traceback you see printed is just a log message, and no exception is actually thrown by the SDK, as it would be against the spec. This PR removed the logged message as it was considered too verbose for the evaluation path. From the OpenFeature spec, Requirement 1.4.10:
|
We recently updated the spec to avoid logging in hot code paths. Instead, a logging hook should be used. |
Hey @agardnerIT, are you running the latest version? We reduced the logging in a previous version and I'm having trouble finding where this log message is coming from. @federicobond @gruebel do either of you see where this log message could be coming from? I've checked both flagd and the SDK. |
I'm pretty sure it's the one already removed by your PR @beeme1mr: open-feature/python-sdk#347 It should not appear in the latest version. |
Is it possible to prevent the thrown Exception and just silently use the default value?
Given the following code, the desired output would be
The current colour is: NA
but, as you can see, an exception is thrown each time I request the value. By definition this leads to log spam and is somewhat low value given that I do have a default value precisely to protect against this possibility.flags.json
Code
Result
Backwards Compatible Change
Perhaps:
The text was updated successfully, but these errors were encountered: