Closed dshokouhi closed 4 years ago
@stianaske what is your take on this implementation? Do you think we need to get more specific with error messaging? Like should we detect when a user changes their password, or if the neato api is having issues?
Maybe we should add TimeoutError and handle it same as ConnectionError. How about TooManyRedirects?
https://stackabuse.com/the-python-requests-module/
--- Edit ---
In order to use timeouts we have to configure them:
We can configure requests to stop waiting for a network requests using the timeout parameter. By default, requests will not timeout.
I guess it's same for redirections. What do you guys think? Should we limit timout and redirections?
@dshokouhi There are two files exceptions.py now. One in the root directory and one in pybotvac. I think we only need the second one. Do you agree?
Looks good. Great work!
Making our requests exceptions more user friendly providing some feedback around what is failing and adding more try/catch blocks against all requests to neato cloud. Please feel free to tweak as needed :)
If possible please publish a new package to pypi so we can include this in home assistant :)