Structured data for error output
Is there a way to get op
to output errors in a structured format such as JSON?
For example, if I do op get item "Example Login"
and there are two items with that name, I get:
[ERROR] 2020/12/03 17:06:41 More than one item matches "Example Login". Try again and specify the item by its UUID: * for the item "Example Login" in vault Test Data: nnotgv5xwrhjbdj6bt3rugrijy * for the item "Example Login" in vault Test Data: nok7367v4vbsfgg2fczwu4ei44
It'd be nice to get a JSON dictionary describing the problem and enumerating the two UUIDs.
For those of us using op
from a script or within a framework, this would really help bubble the problem up to the user or to a higher level of the framework. Or even recover from the error gracefully, like running the query again for each of the UUIDs.
Apologies if this has been asked and answered already.
Cheers,
Zach
1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided
Comments
-
Okay, no worries. I'll keep an eye out for things coming. Thanks!
0 -
No problem :+1:
0