More verbose connection error messages (#565)

This commit is contained in:
Etoh 2023-02-28 20:31:23 +00:00 committed by GitHub
parent e1bcf12a1a
commit 8116e7744b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,6 +105,15 @@ class SyncClientProtocol(JSONCommandProtocol):
self.dropWithError(getMessage("startTLS-server-certificate-invalid"))
elif "mismatched_id=DNS_ID" in str(reason.value):
self.dropWithError(getMessage("startTLS-server-certificate-invalid-DNS-ID"))
elif reason:
try:
self._client.ui.showErrorMessage(str(type(reason)))
self._client.ui.showErrorMessage(str(reason))
if reason.stack:
self._client.ui.showErrorMessage(str(reason.stack))
self._client.ui.showErrorMessage(str(reason.value))
except:
pass
except:
pass
self._client.destroyProtocol()