Skip to content

Avoid adding an HttpClient.Timeout message to ConnectTimeout exceptions - #72274

Merged
MihaZupan merged 3 commits into
dotnet:mainfrom
MihaZupan:httpclient-connecttimeout-wrap
Jul 19, 2022
Merged

MihaZupan merged 3 commits into
dotnet:mainfrom
MihaZupan:httpclient-connecttimeout-wrap

Conversation

@MihaZupan

Copy link
Copy Markdown
Member

Fixes #67505

@MihaZupan MihaZupan added this to the 7.0.0 milestone Jul 15, 2022
@MihaZupan
MihaZupan requested a review from a team July 15, 2022 16:03
@ghost ghost assigned MihaZupan Jul 15, 2022
@ghost

ghost commented Jul 15, 2022

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #67505

Author: MihaZupan
Assignees: -
Labels:

area-System.Net.Http

Milestone: 7.0.0

@CarnaViire CarnaViire left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

}

[Fact]
public async Task UnknownOperationCanceledException_NotWrappedInATimeoutException()

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Looking into it a bit more, there was a broader issue here where we would classify any unknown OCE (not just ConnectTimeout) as HttpClient.Timeout.
I tweaked the checks somewhat to catch such cases as well.

@MihaZupan
MihaZupan requested a review from CarnaViire July 15, 2022 18:05

@CarnaViire CarnaViire left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

Co-authored-by: Natalia Kondratyeva <[email protected]>
@MihaZupan

Copy link
Copy Markdown
Member Author

Failures are #72428

@MihaZupan
MihaZupan merged commit bf7cdc5 into dotnet:main Jul 19, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confusing message on Http timeout

2 participants