CLI error codes documentation?

dotan
dotan
Community Member

Hi,
I was looking for documentation on the CLI error code
Specifically I need to know if a command failed due to "document not found" or otherwise - this gets me an error code of 1, I want to be sure that there's a "===" relation between "doc not found" and error code = 1

Thanks

cli version 0.9.2


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided

Comments

  • ag_ana
    ag_ana
    1Password Alumni

    Hi @dotan! Welcome to the forum!

    Can you please elaborate a bit on what you are trying to do? If you could add some more information I can make sure to send your question to a developer, so any detail you can have is highly appreciated :+1:

  • dotan
    dotan
    Community Member

    Thanks @ag_ana
    I'm programatically deleting items with the CLI. In case a deletion fails, I want to know if it failed because the item was not found (e.g. it was deleted before, I got the wrong ID, etc) or because of some other error (network, permissions, etc)

    My question is, say my request fails: can I confidently determine from the error code wether the failure was due to a missing item?

  • dotan
    dotan
    Community Member

    Update: I learned the hard way that if the vault is missing I get the same error code, which is disappointing

  • felix_1p
    felix_1p
    1Password Alumni

    Hi @dotan, I'm sorry for the late response. Yes, unfortunately the command line tool doesn't make good use of error codes yet. It's on our radar to improve this.

This discussion has been closed.