pub struct ErrorOutput {
pub error: bool,
pub message: String,
pub exit_code: u8,
pub code: Option<String>,
pub help: Option<String>,
}Expand description
Structured JSON error that a tool writes to stdout when --format json is
active and a command fails. It has no kind discriminator. The required
error: true member separates it from a success envelope, which carries a
kind. The error document is one of the root branches of the output
schema. A consumer that passes --format json and sees a non-zero exit
code parses this shape from stdout.
Fields§
§error: boolAlways true. The discriminator that separates an error document from a
success envelope (which instead carries a kind).
message: StringHuman-readable error message.
exit_code: u8The process exit code the CLI returns alongside this document.
code: Option<String>Stable machine-readable code such as FALLOW_INVALID_COVERAGE_PATH,
when the failure has one. Present so an agent can branch on the reason
without pattern-matching the human message.
help: Option<String>Remediation hint for the caller, when the failure has one.