Skip to content

CLI usage errors are logged as fatal with internal file/line details #337

@ChayanDass

Description

@ChayanDass

CLI usage errors are currently logged as fatal errors using ipfs/go-log, which causes internal file names and line numbers to appear in the output (e.g. FATAL main guppy/main.go:29 accepts 1 arg(s), received 0). These are normal user input errors, not crashes, and the output is confusing for a CLI. User-facing errors should be printed in a clean, standard format without fatal log levels or internal source information.

We have two options to print the cli errors:

1:

Error: accepts 1 arg(s), received 0

2:

./guppy login                  
Error: accepts 1 arg(s), received 0
Usage:
  guppy login <account> [flags]

Examples:
  guppy login racha@storacha.network

Flags:
  -h, --help   help for login

Global Flags:
      --config string         Config file path. Attempts to load from user config directory if not set e.g. ~/.config/guppy/config.toml
      --data-dir string       Directory containing the config and data store (default: ~/.storacha/guppy) (default "/home/chayan/.storacha/guppy")
      --database-url string   PostgreSQL connection URL (e.g., postgres://user:pass@host:5432/dbname). If set, uses PostgreSQL instead of SQLite. The database should not be shared with other processes.
      --guppy-dir string      Guupy Directory
      --ui                    Use the guppy UI

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