Skip to main content
zcutlip
December 1, 2022
Question

enhancement request: structured error output

  • December 1, 2022
  • 3 replies
  • 110 views

This may be a long shot but life's short so here goes.

When using op in a scripted environment, particularly in a library, I (and others I think as well) sometimes end up scraping[1] standard error in order to discern what went wrong and either recover gracefully or bubble meaningful information up to the caller.

It would be cool if when passing --format json, if the error output would also be JSON-formatted. It could (and should probably!) still go to stderr. But then it could include additional context and be reliably machine parsable.

[1] I'm not sure if op's error output is localized. If it is, this is even more fragile than I realized.


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser:_ Not Provided

3 replies

Jack_P_1P
1Password Employee
December 2, 2022

Hey @zcutlip:

Thanks for your feedback! While I can't promise anything, we do have an existing issue tracking support for JSON formatted error messages, so I'll add your thoughts to it.

Jack

ref: dev/b5/op#2254

zcutlip
zcutlipAuthor
December 2, 2022

thanks!

Jack_P_1P
1Password Employee
December 5, 2022

You're very welcome!