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

Separate exception for DNS errors #8455

Closed
1 task done
mstojcevich-cisco opened this issue Jun 11, 2024 · 0 comments · Fixed by #8456
Closed
1 task done

Separate exception for DNS errors #8455

mstojcevich-cisco opened this issue Jun 11, 2024 · 0 comments · Fixed by #8456

Comments

@mstojcevich-cisco
Copy link
Contributor

Is your feature request related to a problem?

Currently the aiohttp client raises a ClientConnectorError when DNS resolution fails and there's no clean way to differentiate this ClientConnectorError from ones that happen at other points of the connection.

Describe the solution you'd like

I'd like another Exception, maybe ClientConnectorDNSError that inherits from ClientConnectorError and is raised when DNS resolution fails.

Describe alternatives you've considered

I've considered inspecting the ClientConnectorError to determine whether it's a DNS error, but it's tough to do so without making my calling code aware of the implementation details of the underlying DNS resolver.

Related component

Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant