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

Include history for all client errors raised when fetching a URL #9529

Open
1 task done
PLPeeters opened this issue Oct 23, 2024 · 1 comment
Open
1 task done

Include history for all client errors raised when fetching a URL #9529

PLPeeters opened this issue Oct 23, 2024 · 1 comment

Comments

@PLPeeters
Copy link
Contributor

Is your feature request related to a problem?

Currently, if we attempt to fetch a URL with a bad redirect that raises a DNS resolution error for which the root cause lies with a redirect, we cannot figure out the full redirect chain. Practically, imagine the following redirect chain, where the end does not resolve:

http://foo.com -> http://www.foo.com -> https://www.www.foo.com/test

A get() call will raise a ClientConnectorDNSError, and if we dig into it we can indeed find out the DNS resolution failed for www.www.foo.com, hinting at the fact we were redirected. This information is however incomplete:

  • We don't know we went through http://www.foo.com in the process
  • We don't know the path was /test
  • We don't know the precise status codes of the redirects (301, 302, etc.)

Describe the solution you'd like

I would like to have history available for all errors where history has been generated before raising the error.

Describe alternatives you've considered

None are available, as far as I know.

Related component

Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@Dreamsorcerer
Copy link
Member

Feel free to work on a proposal.

@github-staff github-staff deleted a comment Oct 29, 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