-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
improve error handling #187
Comments
Hey there, thanks for opening this issue. The tool already returns non-zero exit codes for multiple different kinds of exceptions - let's see what I can do to improve exit- and error handling for this camera list 404 situation... If you like you can post a bit more information about your crashes here (please remove/redact personal info from logs first) so that I can have a look and maybe add some improvements here and there to the tool for everyone's benefit... |
Maybe a simple solution is just to have the archiver return the HTTP status code? So in this case it would return 404 instead of 0.
If it's not too much to ask, suppressing the Python exception handler and just printing human-readable errors would already help immensely. Even a simple timeout pukes the entire terminal full of traceback and pushes any previous statuses outside of scrollback. |
Alright, @mufunyo, thanks for the logs and your input. I can implement both ideas. As to why stuff like this is sometimes not already included and also why it sometimes takes a considerable amount of days before I add or fix something: this is a personal weekend project of mine which I decided to open-source here for everyone to use, build upon, or make improvements to by means of a pull request or by opening an issue. I can only work on it if my schedule allows, and it's definitely not intended a 'perfect solution' by any means to a problem that IMHO shouldn't exist in the first place since UI advertises their appliances as 'business-grade network video recorder'... But long story short, below is my task list - you'll be notified once the features are implemented as well as when the next version is available :) ToDo
|
Oh I understand and agree completely. It's an absolute embarrassment that Ubiquiti don't expose a simple archiving function in their own UI, and I get that this is a part time project for you. That's why I didn't reach out before, if I can work around something myself I will, if it means I don't have to bother you with it. However I couldn't work around this particular issue (not without regex parsing stdout/stderr at least) so I figured I'd open an issue. I'm very grateful that you've built this and I'm looking forward to the improvements you have planned! |
Because the archiver script crashes so often, I made a simple Bash script that retries the archiver infinitely until it returns 0. However, this morning I was greeted with "Error while loading camera list: 404" while the script exited "successfully". All errors should return something other than 0 to prevent this from happening.
The text was updated successfully, but these errors were encountered: