-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support for error codes #42
Comments
It's actually not that easy... I use https://github.com/dtolnay/anyhow for error handling which is specifically designed for use cases such as CLI tools, where you don't care about what went wrong, just care about whether it went wrong. Is there a particular use case you can't work around without this atm? Or is this more of a 'nice to have' you have in mind? |
Okay so my issue is kind of an XY type: I want to make sure that the database is unlocked when I retrieve passwords from within isync I use for my email, so my sync script would need to detect that the failure was caused by the fact that no database is unlocked, and that would enable it to not start isync in the first place (I dont want it to run with locked database because it wastes resources and creates a pop up for each failed login, prompting me to type in the password). |
As far as I can tell, git-credential-keepassxc always returns error 0 or 1, regardless of what exactly went wrong. For scriptiing purposes it would be really cool if e.g. no unlocked database was indicated by a different error code from no entry found errors, such that the script can take proper action… I'm not very fluent in rust, but I think it should be really easy to implement for great value, isn't it? :)
The text was updated successfully, but these errors were encountered: