Skip to content

AttributeError: KeyError has no attribute 'error_message' #39

Closed
@agardnerIT

Description

@agardnerIT

value = client.get_boolean_details("requestsModuleEnabled",False)

and

{
    "flags": {
      "requestsModuleEnabled": {
        "state": "ENABLED",
        "variants": {
          "on": true,
          "off": false
        },
        "defaultVariant": "off"
      }
    }
}

Results in:

value = client.get_boolean_details("requestsModuleEnabled",False)
  File "/usr/local/lib/python3.10/site-packages/open_feature/open_feature_client.py", line 63, in get_boolean_details
    return self.evaluate_flag_details(
  File "/usr/local/lib/python3.10/site-packages/open_feature/open_feature_client.py", line 228, in evaluate_flag_details
    error_code=e.error_message,
AttributeError: 'KeyError' object has no attribute 'error_message'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions