Skip to main content

Module errors

Module errors 

Source
Expand description

Structured error types (thiserror) and sysexits-style exit codes. Structured error types for ssh-cli.

Defines crate::errors::SshCliError with domain error categories used by the CLI. Display strings are technical English (lowercase, no trailing period — G-ERR-01). Localized UI copy belongs in i18n.

§Errors contract (G-ERR)

  • Prefer typed variants over [SshCliError::Generic].
  • Preserve std::error::Error::source via helpers [SshCliError::tls_src] / [SshCliError::channel_src] instead of embedding {e} in a flat string.
  • Agents must read [SshCliError::error_code] + [ErrorClass], not parse Display.

Modules§

exit_codes
Process exit codes aligned with sysexits.h and Unix signal conventions.

Enums§

ErrorClass
High-level error class for agent retry policy (Rules Rust — retry/backoff).
ErrorLayer
Stack layer where the failure was observed (diagnostic only).
RetryKind
Detailed retry kind returned by SshCliError::retry_kind.
SshCliError
Domain errors produced by ssh-cli operations.

Functions§

anyhow_is_broken_pipe
Walks anyhow / nested sources looking for a broken-pipe I/O error.
io_error_is_transient_network
Classifies std::io::Error kinds that are typically transient on the network path.
is_broken_pipe
Returns true when err is a broken-pipe condition (EPIPE / SIGPIPE path).

Type Aliases§

ErrorSource
Shared source box for layered errors (Send + Sync for fan-out tasks).
SshCliResult
Result alias using SshCliError.