DOCS
  • Getting Started
  • Custom token vaults
  • Running a check
  • Output and exit codes
  • Preflight errors
  • Conformance checks
  • Security checks
  • Check API
  • Limits and queue
  • Function coverage
  • Result types
  • Test vaults
CLI

Preflight errors

Before any check runs, the CLI checks its prerequisites. If one is missing it exits with code 2 and no check runs.

Error format

In text mode the problem and the fix are printed. With --output json, a single object is printed instead of the usual array:

ABBREVIATED EXAMPLE

json
{
  "error": "preflight_failed",
  "code": "vault_not_a_contract",
  "problem": "…",
  "fix": "…"
}

With --output markdown, the report has the usual title and header, the line Result: Prerequisite missing, no checks were run, then an Error section with the error, the code, a Problem paragraph and a Fix paragraph. The exit code is still 2.

Verified

A report from a real Testnet run with CLI 0.5.0 (vault_not_a_contract, exit code 2) is preflight-error.md in docs/sample-reports/ in the GitHub repository.

Error codes

CodeCauseWhat to do
stellar_not_foundThe stellar executable could not be started.Install Stellar CLI v28 or newer and put it on PATH. On Windows use a package that provides stellar.exe.
stellar_version_too_oldstellar is older than v28.Upgrade the Stellar CLI.
stellar_version_unreadableThe version printed by stellar could not be read.Check that stellar --version works in a terminal.
identities_missingOne or more of the seven identities do not exist.Create them (see Getting Started).
vault_address_malformedThe --vault value is not a valid contract address.Pass a contract address that starts with C and has 56 characters.
vault_not_a_contractThe address is not a contract on Testnet.Check the address and that the vault is deployed on Testnet.

A thin XLM balance (under 5 XLM) is only a warning, never a reason to stop.

Verified

Codes are taken from cli/src/preflight.rs. The "What to do" column is a summary; the CLI prints its own fix text.