Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Do not print out help if the response is a 404 #2112

Closed
Tracked by #1911
raulb opened this issue Jan 28, 2025 · 0 comments · Fixed by #2114
Closed
Tracked by #1911

CLI: Do not print out help if the response is a 404 #2112

raulb opened this issue Jan 28, 2025 · 0 comments · Fixed by #2114
Assignees

Comments

@raulb
Copy link
Member

raulb commented Jan 28, 2025

Currently, if a CLI command is executed correctly, but its response is a 404, the error is returned, and automatically the help is printed.

Example:

Here, I'm trying to describe a non-existent pipeline, and notice how help is automatically printed out.

$ conduit pipelines describe foo
Error: failed to get pipeline: rpc error: code = NotFound desc = failed to get pipeline by ID: pipeline instance not found (ID: foo): pipeline instance not found
Usage:
  conduit pipelines describe [flags]

Aliases:
  describe, desc

Examples:
conduit pipelines describe pipeline-with-dlq
conduit pipelines desc multiple-source-with-processor

Flags:
  -h, --help   help for describe

Global Flags:
      --api.grpc.address string   address where Conduit is running
      --config.path string        path to the configuration file

failed to get pipeline: rpc error: code = NotFound desc = failed to get pipeline by ID: pipeline instance not found (ID: foo): pipeline instance not found
exit status 1

Expected output

$ conduit pipelines describe foo
pipeline instance not found (ID: foo): pipeline instance not found

What to do

We'll need to not show help if the error is expected. Only show help when there is unexpected behavior (wrong flags, wrong args, etc.).

@raulb raulb mentioned this issue Jan 28, 2025
40 tasks
@raulb raulb changed the title Do not print out help if the response is a 404. CLI: Do not print out help if the response is a 404 Jan 28, 2025
@raulb raulb moved this from Triage to TODO (Conduit v.0.13) in Conduit Main Jan 28, 2025
@raulb raulb self-assigned this Jan 30, 2025
@raulb raulb moved this from TODO (Conduit v.0.13) to In Progress in Conduit Main Jan 30, 2025
@raulb raulb mentioned this issue Jan 31, 2025
4 tasks
@raulb raulb moved this from In Progress to Ready for review in Conduit Main Jan 31, 2025
@github-project-automation github-project-automation bot moved this from Ready for review to Done in Conduit Main Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant