-
Notifications
You must be signed in to change notification settings - Fork 38
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
Timeout exceptions not handled properly #47
Comments
Is it better with #56 ? |
from synology_dsm import SynologyDSM
print("Creating Valid API")
api = SynologyDSM("192.168.0.152", "5000", "mark", "pwd", False, timeout=30, debugmode=True) That is essentially my test code above. My NAS was using 192.168.0.152 previously but once I got the network bonding and finalised setup it is now using 192.168.0.240. Changing the timeout just changes how long it takes to spit out the error above rather than handling any errors. I have no device using 192.168.0.152 to reply with a http status code or connection refused or anything similar. There is a similar error if I point it to another server, that says connection refused on port 5000 with a whole lot of unhandled exceptions as well. In the tests, if you had INVALID_HOST as well as VALID_HOST, it would show the same errors as above. |
For my tests I was not in my local network (still not) so maybe that's why. What do you mean by "not handled properly" ? |
Do you have an idea on how to fix this ? Eventually submit a PR if you can. |
When using the example script, and putting in the details for my NAS which has been turned off, I am getting the following messages as the timeout exceptions haven't be properly handled in the code.
This also then impacts on Home Assistant using this, and this is filling the logs as well rather than a simple offline message.
The text was updated successfully, but these errors were encountered: