(error: unknown)
| 160 | } |
| 161 | |
| 162 | function getErrorMessage(error: unknown): string { |
| 163 | if (error instanceof Error) { |
| 164 | return error.message; |
| 165 | } |
| 166 | return String(error); |
| 167 | } |
| 168 | |
| 169 | function mapSftpError(operation: string, error: unknown): KaosSSHError { |
| 170 | const code = getErrorCode(error); |