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

RecursionError is used to indicate repeated failed cloud API requests #15

Closed
mill1000 opened this issue Aug 1, 2023 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@mill1000
Copy link
Owner

mill1000 commented Aug 1, 2023

Originally noticed in mac-zhou/midea-ac-py#217

if int(response['code']) != 0:
self.handle_api_error(int(response['code']), response['msg'])
# If you don't throw, then retry
_LOGGER.debug("Retrying API call: '{}'".format(endpoint))
self._retries += 1
if (self._retries < 3):
return self.api_request(endpoint, args)
else:
raise RecursionError()

@mill1000 mill1000 added the bug Something isn't working label Aug 1, 2023
@mill1000 mill1000 mentioned this issue Aug 25, 2023
@mill1000
Copy link
Owner Author

Resolved in #37

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
Development

No branches or pull requests

1 participant