Skip to main content

emit_error_json_with_suggestion

Function emit_error_json_with_suggestion 

Source
pub fn emit_error_json_with_suggestion(
    code: i32,
    message: &str,
    error_class: &str,
    retryable: bool,
    suggestion: Option<&str>,
    discarded_flags: &[String],
)
Expand description

GAP-SG-39: emits the actionable failure envelope for a classified error.

The suggestion tells the operator HOW to recover instead of leaving an exit code without guidance, and error_class / retryable tell an agent whether recovering is even possible — which is what makes a write rejection observable, fixable, and safe to automate.