Skip to content
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

Forward StatusCode to HttpRequestException whenever possible #105700

Open
antonfirsov opened this issue Jul 30, 2024 · 1 comment
Open

Forward StatusCode to HttpRequestException whenever possible #105700

antonfirsov opened this issue Jul 30, 2024 · 1 comment

Comments

@antonfirsov
Copy link
Member

antonfirsov commented Jul 30, 2024

Following up on #105610 & #105546, I found a few othe places where StatusCode could be forwarded, there might be more.

throw new HttpRequestException(HttpRequestError.VersionNegotiationError, SR.Format(SR.net_http_requested_version_server_refused, request.Version, request.VersionPolicy), e);

throw new HttpRequestException(HttpRequestError.UserAuthenticationError, SR.net_http_authconnectionfailure);

throw new HttpRequestException(HttpRequestError.UserAuthenticationError, SR.net_http_authconnectionfailure);

@antonfirsov antonfirsov added enhancement Product code improvement that does NOT require public API changes/additions area-System.Net.Http labels Jul 30, 2024
@antonfirsov antonfirsov added this to the Future milestone Jul 30, 2024
Copy link
Contributor

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

@stephentoub stephentoub modified the milestones: Future, 10.0.0 Jul 30, 2024
@stephentoub stephentoub added bug and removed enhancement Product code improvement that does NOT require public API changes/additions labels Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants