Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

feat: document and stabilize exit codes and error.code values

Closed
#634 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@margaretjgu is already working on this.

Since Sep 22, 2026.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Read AGENTS.md and the help topic work in #630 to identify the existing error.code strings and documented exit-code expectations. Probe elastic status --json for the auth_required and transport_error flows, then add one test per documented code and verify missing-config JSON errors and the changelog note for any changed codes.

Written by the indexing model from the issue text.

Description

enhancement

We almost always exit 1. JSON errors use ad hoc error.code strings (transport_error, confirmation_required, input_validation_failed, command_blocked) with no catalog.

For agents this is the difference between retry with --yes and give up.

  1. Publish a table (help topic in #630): 0 success, 1 generic, then reserve 2 usage, 3 validation, 4 auth/config, 5 network. Implementing the split can follow the table. Do not silently change codes on existing scripts without a changelog note.
  2. Freeze error.code strings in AGENTS.md. Add codes for auth_required, config_invalid, not_found if we do not already emit them.
  3. elastic status --json should be the probe agents run after auth_required / transport_error.

Acceptance: help topic lists codes. --json errors on a missing config use a documented code. One test per code.

Dominant language
TypeScript
Stars
45
Forks
26
Avg merge
2d 1h
Merged PRs (30d)
51

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from elastic/cli

All issues in elastic/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.