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

[API Proposal]: Provide tunnel status code for proxy exceptions #66329

Closed
jgilbert2017 opened this issue Mar 8, 2022 · 3 comments · Fixed by #105610
Closed

[API Proposal]: Provide tunnel status code for proxy exceptions #66329

jgilbert2017 opened this issue Mar 8, 2022 · 3 comments · Fixed by #105610
Labels
api-needs-work API needs work before it is approved, it is NOT ready for implementation area-System.Net.Http help wanted [up-for-grabs] Good issue for external contributors
Milestone

Comments

@jgilbert2017
Copy link

Background and motivation

API user would like to have specific information about why a proxy connection failed without the need to parse a text based error message.

Dotnet 6 altered how proxy errors were handled as part of #48679. Rather than the proxy response being returned to the user, an error message is returned. This was done to distinguish proxy related errors from upstream errors.

I have a need to distinguish proxy errors based upon the status code the proxy returned. This information is conveyed as part of the error message "The proxy tunnel request to proxy {proxyUri} failed with status code {statusCode}."

Please make the proxy status code somehow directly available to the user rather than by parsing a text string.

API Proposal

TBD

API Usage

TBD

Alternative Designs

No response

Risks

No response

@jgilbert2017 jgilbert2017 added the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Mar 8, 2022
@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Net.Http untriaged New issue has not been triaged by the area owner labels Mar 8, 2022
@ghost
Copy link

ghost commented Mar 8, 2022

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

Issue Details

Background and motivation

API user would like to have specific information about why a proxy connection failed without the need to parse a text based error message.

Dotnet 6 altered how proxy errors were handled as part of #48679. Rather than the proxy response being returned to the user, an error message is returned. This was done to distinguish proxy related errors from upstream errors.

I have a need to distinguish proxy errors based upon the status code the proxy returned. This information is conveyed as part of the error message "The proxy tunnel request to proxy {proxyUri} failed with status code {statusCode}."

Please make the proxy status code somehow directly available to the user rather than by parsing a text string.

API Proposal

TBD

API Usage

TBD

Alternative Designs

No response

Risks

No response

Author: jgilbert2017
Assignees: -
Labels:

api-suggestion, area-System.Net.Http, untriaged

Milestone: -

@wfurt
Copy link
Member

wfurt commented Mar 8, 2022

Triage: looks reasonable. We should look at it at some point.

@wfurt wfurt removed the untriaged New issue has not been triaged by the area owner label Mar 8, 2022
@wfurt wfurt added this to the Future milestone Mar 8, 2022
@wfurt wfurt added api-needs-work API needs work before it is approved, it is NOT ready for implementation help wanted [up-for-grabs] Good issue for external contributors labels Mar 8, 2022
@MihaZupan MihaZupan removed the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Mar 8, 2022
@ghost
Copy link

ghost commented Aug 9, 2022

This is a huge issue to our team because we used the status code in combination with a default proxy property to determine whether we need to retry a request with a proxy server authentication.

There's currently no way to tell whether proxy required authentication, other than comparing an exception message which is not an acceptable workaround, especially in localized environments.

What are your suggestions to mitigate it in the current version of .NET 6?

@github-actions github-actions bot locked and limited conversation to collaborators Aug 31, 2024
@karelz karelz modified the milestones: Future, 9.0.0 Sep 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-needs-work API needs work before it is approved, it is NOT ready for implementation area-System.Net.Http help wanted [up-for-grabs] Good issue for external contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants