sentry-cli icon indicating copy to clipboard operation
sentry-cli copied to clipboard

Flag for structured error output

Open lforst opened this issue 3 years ago • 3 comments

Tools that depend on Sentry CLI are dependent on the CLI to output helpful error messages. Additionally, these tools may want to do error handling based on what error is thrown.

To allow for structured "piping" of CLI output and proper error handling it would be cool to have a flag (eg. --json-error) that will provide information in a structured format when the CLI exits with an error. The JS interface could then also make use of this output to generate more useful errors.

lforst avatar Dec 12 '22 15:12 lforst

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Jan 03 '23 00:01 github-actions[bot]

Speaking of error output... USAGE prompt specifies incorrect order for login subcommand image

ihorbond avatar Jan 10 '23 17:01 ihorbond

@ihorbond it's because login is a subcommand, which has no --url option in itself, it's a global option, and if you ask for sentry-cli --help it will be listed correctly as sentry-cli [OPTIONS] <SUBCOMMAND>. We cannot change it now due to backwards compatibility, as there are some other subcommand that have url option themselves, with a different meaning.

For example sentry-cli --url 'http://myinstance.com/sentry' releases new awesome-release --url 'http://staging.myapp.com' is a completely valid command.

kamilogorek avatar Jan 11 '23 08:01 kamilogorek