Skip to content

Add missing exception info for HttpClient and SocketsHttpHandler properties #11043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 5, 2025

Conversation

antonfirsov
Copy link
Member

I went through all HttpClient and SocketsHttpHandler properties harmonizing the exception docs with the actual implementation.

I didn't touch HttpClientHandler docs, because most property setters are forwareded to the underlying handler, making it hard to provide comprehensive and reliable docs.

Fixes #10962

@antonfirsov antonfirsov requested a review from a team as a code owner March 4, 2025 00:20
@ghost ghost added the area-System.Net.Http label Mar 4, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl

Copy link

Learn Build status updates of commit a92e85b:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details
xml/System.Net.Http/HttpClient.xml ❌Error Details
xml/System.Net.Http/SocketsHttpHandler.xml ❌Error Details

  • Line 0, Column 0: [Error: ECMA2Yaml_File_LoadFailed] Failed to load 2 files, aborting...

xml/System.Net.Http/HttpClient.xml

  • Line 0, Column 0: [Error: ECMA2Yaml_InternalError]
Intenal Several Error: System.Xml.XmlException: The 'Docs' start tag on line 2346 position 8 does not match the end tag of 'exception'. Line 2361, position 11.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
   at System.Xml.XmlTextReaderImpl.ParseEndElement()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
   at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
   at ECMA2Yaml.ECMALoader.LoadType(FileItem typeFile)
   at ECMA2Yaml.ECMALoader.LoadTypes(String basePath, Namespace ns)

xml/System.Net.Http/SocketsHttpHandler.xml

  • Line 0, Column 0: [Error: ECMA2Yaml_InternalError]
Intenal Several Error: System.Xml.XmlException: The 'Docs' start tag on line 507 position 8 does not match the end tag of 'exception'. Line 523, position 12.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
   at System.Xml.XmlTextReaderImpl.ParseEndElement()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
   at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
   at ECMA2Yaml.ECMALoader.LoadType(FileItem typeFile)
   at ECMA2Yaml.ECMALoader.LoadTypes(String basePath, Namespace ns)

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

Copy link

Learn Build status updates of commit 84ad1e1:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Net.Http/HttpClient.xml ✅Succeeded View
xml/System.Net.Http/SocketsHttpHandler.xml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit.

Co-authored-by: Genevieve Warren <[email protected]>
Copy link

Learn Build status updates of commit bf1a7e9:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Net.Http/HttpClient.xml ✅Succeeded View
xml/System.Net.Http/SocketsHttpHandler.xml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@antonfirsov antonfirsov merged commit f5d517c into dotnet:main Mar 5, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ArgumentOutOfRangeException is also thrown when setting HttpClient.Timeout to more than 24 days
3 participants