That error code = 5 corresponds to one of two cases:
1) if the response from the server to a credentials check request, does not contain a specific header: "MS-ASProtocolVersions"
2) if the response from the server to a credentials check request, is an error code other than SslHandshakeFailedError, AuthenticationRequiredError, TemporaryNetworkFailureError, TimeoutError, HostNotFoundError, NetworkSessionFailedError, UnknownNetworkError, or a NetworkProxyError.
Unfortunately, the code in question doesn't have enough debug logging to help us ascertain which of these two codepaths might be being activated in your case.
↧