Skip to content

Show commands should return empty string with exit code 0 for 404 responses #1952

@johanste

Description

@johanste

Today, for the most part, a show command will return a non-zero (failure) exit code for non 200 responses. This makes it impossible to distinguish between the resource not existing and other server (or client) failures.

It would be preferable to return 0 and an empty string in these scenarios.

One way to implement is to add an additional keyword argument to the register_cli_command method that acts as an exception filter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CoreCLI core infrastructure

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions