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

[BUG] ExceptionObject has no attribute error_message #17

Closed
agardnerIT opened this issue Oct 2, 2022 · 0 comments · Fixed by #25 or #27
Closed

[BUG] ExceptionObject has no attribute error_message #17

agardnerIT opened this issue Oct 2, 2022 · 0 comments · Fixed by #25 or #27
Labels
bug Something isn't working

Comments

@agardnerIT
Copy link
Contributor

error_code=e.error_message,

e.error_message is hardcoded but error_message isn't always available.

  File "/usr/local/lib/python3.9/site-packages/open_feature/open_feature_client.py", line 78, in get_string_value
    return self.evaluate_flag_details(
  File "/usr/local/lib/python3.9/site-packages/open_feature/open_feature_client.py", line 228, in evaluate_flag_details
    error_code=e.error_message,
AttributeError: 'ConnectTimeout' object has no attribute 'error_message'

To Recreate

Add a provider with this signature

def get_string_details(
        self,
        key: str,
        default_value: str,
        evaluation_context: EvaluationContext = None,
        flag_evaluation_options: typing.Any = None,
    ):
      raise("foobar exception")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants