1use thiserror::Error;
4use std::io;
5
6#[derive(Debug, Error)]
8pub enum TransportError {
9 #[error("SSH connection error: {0}")]
11 Connection(String),
12
13 #[error("Bootstrap error: {0}")]
15 Bootstrap(String),
16
17 #[error("Authentication failed: {0}")]
19 Authentication(String),
20
21 #[error("I/O error: {0}")]
23 Io(#[from] io::Error),
24
25 #[error("Operation timed out")]
27 Timeout,
28
29 #[error("Protocol error: {0}")]
31 Protocol(String),
32
33 #[error("Configuration error: {0}")]
35 Configuration(String),
36
37 #[error("Remote command failed with exit code {code}: {message}")]
39 CommandFailed {
40 code: i32,
42 message: String
44 },
45}