Skip to content

[BUG] ExceptionObject has no attribute error_message #17

@agardnerIT

Description

@agardnerIT

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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions