8000 docs: list the min/v1/error codes and their exit codes in cli-min.md · Issue #3402 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

docs: list the min/v1/error codes and their exit codes in cli-min.md #3402

Open

Description

@norrietaylor

Problem

min in a machine output mode (-o json) prints a min/v1/error object whose code names the error kind. Scripts match on that string. docs/reference/cli-min.md does not list the codes, so a script author cannot tell which codes exist or which exit code each stands for.

#3386 adds the box address refusal codes:

Exit code When
2 usage the address matches more than one box, or an id start is ambiguous
4 not_found the address matches no box
7 host_unreachable the box's host does not answer

usage is new. No other code or document defined a kind for exit 2. The review on #3386 flagged that a later rename would break scripts.

Ask

Document the min/v1/error object in docs/reference/cli-min.md: its fields (code, message, hint), and every code the CLI emits with the exit code it goes with. Include the three above and the ones emitted elsewhere (BoxAddressRefusal::code in crates/minimal/src/cmd/boxes/address.rs, and machine_mode_answer in crates/minimal/src/main.rs). State that a code is stable once documented.


This is a residual of epic #2879 (BCLI).

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

    priority:should-haveShould be done. Applied by the inbox-route classifier or a human.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0