Skip to content

Service commands: write a structured error to the --output file on failure #1990

Open

Description

@vlad-uipath

When a @service_command fails (click.ClickException for a 401, 400, not-found, etc., in packages/uipath/src/uipath/_cli/_utils/_service_base.py), nothing is written to --output. The only signal is free text on stderr and exit 1.

Wrappers such as the uip CLI (UiPath/cli#6017) need to tell auth, not-found and validation failures apart for callers that branch on them, and can't do that without parsing stderr text.

Please write a JSON error object to the --output file on failure, e.g. {"error": {"status_code": 404, "code": "not_found", "message": "..."}}.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions