Giter VIP home page Giter VIP logo

Comments (2)

KaiJan57 avatar KaiJan57 commented on May 14, 2024 1

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).
In the end I worked around this issue by creating a test entry that is guaranteed to be available, so if that request fails, my script knows that the database is locked and it does not invoke isync.
I know, if it really is that bad to implement, I think we might consider this issue a 'nice to have' and focus on other matters (close this issue if you think alike), but if you find a good opportunity to implement different error codes, I would be happy to avoid that dirty hack ;)
Anyhow, thanks for considering my request and have a nice day :)

from git-credential-keepassxc.

Frederick888 avatar Frederick888 commented on May 14, 2024

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?

from git-credential-keepassxc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.