CLI error codes documentation?

dotandotan

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_anaag_ana

    Team Member

    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:

  • 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?

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

  • felix_1pfelix_1p

    Team Member

    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.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file