RobertIndie commented on issue #229:
URL: 
https://github.com/apache/pulsar-dotpulsar/issues/229#issuecomment-2896520990

   It seems that we havn't handle the exception for `NETSTANDARD2_0` part of 
code: 
https://github.com/apache/pulsar-dotpulsar/blob/53c5b1bc17bc868858cdde3b5f337c3eb301831b/src/DotPulsar/Internal/Connector.cs#L101-L115
   Was this intentional?
   
   Besides, currently we are puting the exact SslPolicyErrors into the 
Excetpion.Data. But when users  print the exception, they don't see any 
SslPolicyData from the excetpion stack:
   ```
   The PulsarClient got an exception: 
System.Security.Authentication.AuthenticationException: The remote certificate 
was rejected by the provided RemoteCertificateValidationCallback.
   ```
   
   Could we also include this SslPolicyErrors to the Exception.Message so it 
would be like:
   ```
   The PulsarClient got an exception: 
System.Security.Authentication.AuthenticationException: SSL Validation Error: 
RemoteCertificateNotAvailable
    ---> System.Security.Authentication.AuthenticationException: The remote 
certificate was rejected by the provided RemoteCertificateValidationCallback.
      at System.Net.Security.SslStream.SendAuthResetSignal(ReadOnlySpan`1 
alert, ExceptionDispatchInfo exception)
      at 
System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions 
sslAuthenticationOptions)
      at 
System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean 
receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
      at DotPulsar.Internal.Connector.EncryptStream(Stream stream, String host, 
CancellationToken cancellationToken) in 
/Users/rbt/code/pulsar-dotpulsar/src/DotPulsar/Internal/Connector.cs:line 140
      --- End of inner exception stack trace ---
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to