forked from kay/RouterOS
Fix: SSH-Fehlermeldung zeigt echten NIOSSHError-Grund statt Platzhalter
NIOSSHError.localizedDescription bridged auf NSError und liefert nur "The operation couldn't be completed. (NIOSSH.NIOSSHError error 1.)" — der eigentliche Fehlertyp/die Diagnostik steckt in der internen CustomStringConvertible-Beschreibung. String(describing:) statt .localizedDescription verwenden, um den echten Grund (z.B. Algorithmus- Aushandlung, Host-Key, Auth) sichtbar zu machen. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HReLXMbmPvtQ23p1iWiJNW
This commit is contained in:
@@ -27,7 +27,10 @@ final class SSHTransport: RouterOSTransport {
|
||||
reconnect: .never
|
||||
)
|
||||
} catch {
|
||||
throw RouterOSError.transportUnavailable("SSH-Verbindung fehlgeschlagen: \(error.localizedDescription)")
|
||||
// NIOSSHError's `.localizedDescription` is a useless generic NSError-bridged string
|
||||
// ("The operation couldn't be completed."); its real diagnostics only surface via
|
||||
// CustomStringConvertible, which `String(describing:)` picks up.
|
||||
throw RouterOSError.transportUnavailable("SSH-Verbindung fehlgeschlagen: \(String(describing: error))")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user