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

Add unique exceptions for different timeouts #7801

Closed
1 task done
Hessamshar opened this issue Nov 7, 2023 · 1 comment
Closed
1 task done

Add unique exceptions for different timeouts #7801

Hessamshar opened this issue Nov 7, 2023 · 1 comment

Comments

@Hessamshar
Copy link

Hessamshar commented Nov 7, 2023

Is your feature request related to a problem?

Currently a connection pool timeout and a socket read timeout raise the same exception (aiohttp.ServerTimeoutError). This is not ideal since in our app we would like to apply different logic for different kinds of timeouts but currently it is not possible.

Inherently, a request going through but timing out while getting processed in the target is a much different issue than it timing out establishing a connection to the target. Treating these two different problems the same way is not ideal.

Describe the solution you'd like

Define unique exceptions for all kinds of timeouts.

Describe alternatives you've considered

Time how long it takes for the request to timeout locally, if we get aiohttp.ServerTimeoutError and the time to timeout is less than equal to the connect timeout, then it is potentially a connect timeout.

Related component

Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@Hessamshar Hessamshar changed the title Different exceptions for different timeouts Add unique exceptions for different timeouts Nov 7, 2023
atbuy added a commit to atbuy/aiohttp that referenced this issue Nov 11, 2023
atbuy added a commit to atbuy/aiohttp that referenced this issue Nov 11, 2023
atbuy added a commit to atbuy/aiohttp that referenced this issue Nov 28, 2023
atbuy added a commit to atbuy/aiohttp that referenced this issue Nov 28, 2023
atbuy added a commit to atbuy/aiohttp that referenced this issue Nov 28, 2023
atbuy added a commit to atbuy/aiohttp that referenced this issue Dec 2, 2023
xiangxli pushed a commit to xiangxli/aiohttp that referenced this issue Dec 4, 2023
@Dreamsorcerer
Copy link
Member

Dreamsorcerer commented Sep 3, 2024

#7818

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