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

Not handling service unavailable properly #5

Open
eavanvalkenburg opened this issue Jun 29, 2020 · 1 comment
Open

Not handling service unavailable properly #5

eavanvalkenburg opened this issue Jun 29, 2020 · 1 comment

Comments

@eavanvalkenburg
Copy link

Hi,

Overnight my HA with your custom component running started logging all of these:

2020-06-28 22:28:06 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/raincloud/__init__.py", line 142, in hub_refresh
    hass.data[DATA_RAINCLOUD].data.update()
  File "/usr/local/lib/python3.7/site-packages/raincloudy/core.py", line 178, in update
    controller.update()
  File "/usr/local/lib/python3.7/site-packages/raincloudy/controller.py", line 76, in update
    faucet.update()
  File "/usr/local/lib/python3.7/site-packages/raincloudy/faucet.py", line 141, in update
    req.raise_for_status()
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: https://wifiaquatimer.com/get_cu_and_fu_status?controller_serial=5410ec286a83&faucet_serial=ad20

Looks like the code doesn't handle this gracefully, and keeps trying, would be good to put a check in and then also backoff the refreshes until it responds normally again.

@vanstinator
Copy link
Owner

This is reasonable request. I'll try to make some time for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants