Skip to content

Cryptic TLS Error messages #2278

Open
Open
@NickOtto-FeyIndustries

Description

@NickOtto-FeyIndustries

Describe the bug
Newer versions of RestSharp produce cryptic TLS errors when debugging.

To Reproduce
Take any working C# code and manually specify a version of tls protocol to use that is lower than what your system allows (this is for reproducing the error, please don't actually hard code tls security protocols in production).
For example:
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11

Expected behavior
Here is the snippet from the stack trace in RestSharp version 106.12.0 that was useful in diagnosing the tls error we encountered:
Exception:Web Exception: The request was aborted: Could not create SSL/TLS secure channel.

Here is a snippet from the stack trace in RestSharp version 112.1.0:
Exception:HTTP Request Error: An error occurred while sending the request.

Desktop

  • OS: Windows 11
  • .NET 4.7.2

The error message in Restsharp 106.12.0 was invaluable in diagnosing error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions