aiohttp icon indicating copy to clipboard operation
aiohttp copied to clipboard

Document that `WebSocketResponse.receive()` raises `asyncio.TimeoutError`

Open antonagestam opened this issue 6 years ago • 4 comments

To be able to do anything useful with the timeout feature of WebSocketResponse.receive() you will probably want to catch the exceptions that occur. It's currently quite hard to find what exceptions will be raised on timeouts without digging through source code. I suggest documenting the fact.

Related issue: https://github.com/aio-libs/aiohttp/issues/2906 receive() in the documentation/reference: https://aiohttp.readthedocs.io/en/stable/web_reference.html#aiohttp.web.WebSocketResponse.receive

antonagestam avatar Aug 06 '19 08:08 antonagestam

.receive() can raise many exception types. If you want to make a PR for docs fix -- you are welcome.

asvetlov avatar Aug 15 '19 17:08 asvetlov

Can I give a try on this document enhancement?

mhaoda avatar Oct 05 '24 10:10 mhaoda

Of course. Seems like it should be a fairly simple change.

Dreamsorcerer avatar Oct 05 '24 17:10 Dreamsorcerer

Thanks, I'll work on it then.

mhaoda avatar Oct 06 '24 04:10 mhaoda