Skip to content

Commit a52e149

Browse files
authored
docs: Document asyncio.TimeoutError for WebSocketResponse.receive methods (#12042)
1 parent fd31137 commit a52e149

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGES/12042.doc.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Documented :exc:`asyncio.TimeoutError` for ``WebSocketResponse.receive()``
2+
and related methods -- by :user:`veeceey`.

docs/web_reference.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,8 @@ and :ref:`aiohttp-web-signals` handlers::
12751275

12761276
:raise RuntimeError: if connection is not started
12771277

1278+
:raise asyncio.TimeoutError: if timeout expires before receiving a message
1279+
12781280
.. method:: receive_str(*, timeout=None)
12791281
:async:
12801282

@@ -1293,6 +1295,8 @@ and :ref:`aiohttp-web-signals` handlers::
12931295

12941296
:raise aiohttp.WSMessageTypeError: if message is not :const:`~aiohttp.WSMsgType.TEXT`.
12951297

1298+
:raise asyncio.TimeoutError: if timeout expires before receiving a message
1299+
12961300
.. method:: receive_bytes(*, timeout=None)
12971301
:async:
12981302

@@ -1312,6 +1316,8 @@ and :ref:`aiohttp-web-signals` handlers::
13121316

13131317
:raise aiohttp.WSMessageTypeError: if message is not :const:`~aiohttp.WSMsgType.BINARY`.
13141318

1319+
:raise asyncio.TimeoutError: if timeout expires before receiving a message
1320+
13151321
.. method:: receive_json(*, loads=json.loads, timeout=None)
13161322
:async:
13171323

@@ -1335,6 +1341,7 @@ and :ref:`aiohttp-web-signals` handlers::
13351341

13361342
:raise TypeError: if message is :const:`~aiohttp.WSMsgType.BINARY`.
13371343
:raise ValueError: if message is not valid JSON.
1344+
:raise asyncio.TimeoutError: if timeout expires before receiving a message
13381345

13391346

13401347
.. seealso:: :ref:`WebSockets handling<aiohttp-web-websockets>`

0 commit comments

Comments
 (0)