Skip to content

fix: auth failures should point at status and config edit #636

Description

@margaretjgu

TLS errors already append a hint (src/es/errors.ts). 401/403 from ES, Kibana, or Cloud usually dump the transport body.

On 401/403 (and expired API key if we can detect it), append one hint:

  • elastic status --json to see which service failed
  • elastic config context edit (or the Cloud reset-credentials command when the context is a Serverless project)

Keep the original server message. Hint goes on stderr after it. --json puts the hint in error.hint so agents can parse it.

Acceptance: mock 401 on elastic stack es ping --json includes error.hint naming elastic status.

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

Metadata

Metadata

Assignees

Labels

enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions