Skip to content

fix(cli): every error says what went wrong and what to do next #81

Open

Description

@FreshlyBrewedCode

Parent

#78

What to build

Any failure the CLI reports names the actual problem and the remedy. This is a general pass over error reporting, with the GitHub transport as its worst offender rather than its only subject.

Every GitHub request failure that is not a rate limit currently collapses into one message. An invalid credential, a credential without access to the repository, a renamed or deleted repository, and a missing issue all surface as the same unexpected status N — nothing distinguishes them and nothing suggests a fix. A good message for exactly this situation already exists and is used at init time only; the hot path never reaches it, so the failure an agent actually hits is the one with no guidance.

Classify at the transport and report in the caller's terms: an invalid or expired credential, a credential that cannot reach the repository, a repository that does not exist or is not visible, and a resource that does not exist are four failures with four different remedies.

Then sweep the rest of the CLI for messages that diagnose without directing, and give them a next step.

Acceptance criteria

  • With an invalid credential in the environment, wayful map list reports that the credential is invalid or expired and names how to supply a working one.
  • With a valid credential that cannot access the project's repository, wayful map list reports the access problem and does not suggest signing in again.
  • With a project configured for a repository that does not exist, wayful map list names the repository and says it cannot be found or is not visible to the current credential.
  • Rate-limit failures keep their existing distinct primary and secondary messages and retry advice.
  • No user-facing error ends without either a remedy or a precise statement of what is missing.
  • Every message stays a single wayful:-prefixed stderr line with no stack trace.

Blocked by

None (can start immediately).

Metadata

Metadata

Assignees

No one assigned

    Labels

    pkg:clitype:bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions