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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions xml/System.Net.Http/HttpClient.xml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ The specified `handler` will be disposed of by calling [HttpClient.Dispose](xref

]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The <see cref="T:System.Uri" /> specified is not an absolute URI.</exception>
<exception cref="T:System.InvalidOperationException">The <see cref="T:System.Net.Http.HttpClient" /> instance has already started one or more requests.</exception>
<exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Net.Http.HttpClient" /> instance has already been disposed.</exception>
</Docs>
</Member>
<Member MemberName="CancelPendingRequests">
Expand Down Expand Up @@ -508,6 +511,8 @@ The `DefaultRequestVersion` property can be changed as long as the <xref:System.
This property has no effect on any of the <xref:System.Net.Http.HttpClient.Send%2A> or <xref:System.Net.Http.HttpClient.SendAsync%2A> overloads that accept an <xref:System.Net.Http.HttpRequestMessage?displayProperty=nameWithType>.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The <see cref="T:System.Net.Http.HttpClient" /> instance has already started one or more requests.</exception>
<exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Net.Http.HttpClient" /> instance has already been disposed.</exception>
</Docs>
</Member>
<MemberGroup MemberName="DeleteAsync">
Expand Down Expand Up @@ -2349,7 +2354,10 @@ The <paramref name="requestUri" /> is not an absolute URI.

]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The size specified is less than or equal to zero.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">The size specified is less than or equal to zero
-or-

The size specified is greater than the maximum allowed buffer size.</exception>
<exception cref="T:System.InvalidOperationException">An operation has already been started on the current instance.</exception>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
Expand Down Expand Up @@ -3720,7 +3728,11 @@ httpClient.Timeout = TimeSpan.FromMinutes(10);

]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The timeout specified is less than or equal to zero and is not <see cref="F:System.Threading.Timeout.InfiniteTimeSpan" />.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">The timeout specified is less than or equal to zero and is not <see cref="F:System.Threading.Timeout.InfiniteTimeSpan" />

-or-

The timeout specified is greater than <see cref="F:System.Int32.MaxValue" /> milliseconds.</exception>
<exception cref="T:System.InvalidOperationException">An operation has already been started on the current instance.</exception>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
Expand Down
Loading