Skip to content

AttributeError: 'int' object has no attribute 'status' #50

@asqui

Description

@asqui

New failure mode that might also be arising from unexpected responses from the REST API (hard to tell for certain because the inner exception detail is lost when it gets re-raised -- perhaps that is a separate issue that needs attention?)

  File "/opt/ecn/python_3rd_party/opsgenie_sdk/api/alert/__init__.py", line 2166, in list_alerts
    (data) = self.list_alerts_with_http_info(**kwargs)  # noqa: E501
  File "/opt/ecn/python_3rd_party/opsgenie_sdk/api/alert/__init__.py", line 2261, in list_alerts_with_http_info
    collection_formats=collection_formats)
  File "/opt/ecn/python_3rd_party/opsgenie_sdk/api_client.py", line 432, in call_api
    _preload_content, _request_timeout, _host)
  File "/opt/ecn/python_3rd_party/opsgenie_sdk/api_client.py", line 222, in __call_api
    raise exception
AttributeError: 'int' object has no attribute 'status'

This error happened only once and then went away, so that supports the hypothesis that it was some sort of strange REST response that caused it. If so, this will be the third recent example of API failure due to unexpected REST responses.

Maybe what is needed is a holistic approach to processing REST responses that triggers retries if any expectation about a normal REST response is not met?

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