Skip to main content

classify_failure

Function classify_failure 

Source
pub fn classify_failure(
    _exit_code: i32,
    stdout: &str,
    stderr: &str,
) -> Option<AuthErrorKind>
Expand description

Inspect a failed claude invocation and decide whether it looks auth-shaped. Returns Some(kind) only when the patterns are confident enough to risk relabeling.

exit_code, stdout, and stderr come from the CLI’s exit; the classifier matches against the lowercased concatenation. The patterns are intentionally narrow: