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:
Kay
2026-09-11 21:33:29 +02:00
co-authored by Claude Sonnet 5
parent 6c230827be
commit 5b7c51f62b
@@ -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))")
}
}