1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum WinRMError {
5 #[error("Authentication failed using {method}: {reason}")]
6 AuthenticationFailed { method: String, reason: String },
7
8 #[error("Connection failed to {endpoint}: {details}")]
9 ConnectionError { endpoint: String, details: String },
10
11 #[error("Invalid server response: {details}")]
12 InvalidResponse { details: String },
13
14 #[error("Shell operation failed: {operation}")]
15 ShellError { operation: String },
16
17 #[error("File transfer failed: {operation} - {path}\nReason: {reason}")]
18 FileTransferError {
19 operation: String,
20 path: String,
21 reason: String
22 },
23
24 #[error("Command execution failed (exit code {exit_code}):\n{stderr}")]
25 CommandFailed {
26 exit_code: i32,
27 stderr: String
28 },
29}