Skip to content

Commit

Permalink
Add @smart_retry decoration to status() method to avoid 401 errors wh…
Browse files Browse the repository at this point in the history
…en the token cookie expires (#2566)
  • Loading branch information
aadlung authored Dec 16, 2024
1 parent bb5d575 commit f5fa691
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions unifi_console/datadog_checks/unifi_console/unifi.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def login(self):
err_msg = "Connection to {} failed: {}".format(self.__path(APILoginPath), e)
raise APIConnectionError(err_msg) from None

@smart_retry
def status(self) -> ControllerInfo:
resp = self._get_json(APIStatusPath)
return ControllerInfo(resp)
Expand Down

0 comments on commit f5fa691

Please sign in to comment.