From 8daecf5cc357518957deec45a526dfd1703ec48b Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Mon, 2 Sep 2024 01:27:44 +0100 Subject: [PATCH] List specific timeouts for each exception (#8968) --- CHANGES/8968.doc.rst | 1 + docs/client_reference.rst | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 CHANGES/8968.doc.rst diff --git a/CHANGES/8968.doc.rst b/CHANGES/8968.doc.rst new file mode 100644 index 00000000000..3420794586f --- /dev/null +++ b/CHANGES/8968.doc.rst @@ -0,0 +1 @@ +Clarified which timeout exceptions happen on which timeouts -- by :user:`Dreamsorcerer`. diff --git a/docs/client_reference.rst b/docs/client_reference.rst index b0bbe769ec6..61dabcc8374 100644 --- a/docs/client_reference.rst +++ b/docs/client_reference.rst @@ -2295,17 +2295,20 @@ Connection errors Server operation timeout: read timeout, etc. + To catch all timeouts, including the ``total`` timeout, use + :exc:`asyncio.TimeoutError`. + Derived from :exc:`ServerConnectionError` and :exc:`asyncio.TimeoutError` .. class:: ConnectionTimeoutError - Connection timeout on request: e.g. read timeout. + Connection timeout on ``connect`` and ``sock_connect`` timeouts. Derived from :exc:`ServerTimeoutError` .. class:: SocketTimeoutError - Reading from socket timeout. + Reading from socket timeout on ``sock_read`` timeout. Derived from :exc:`ServerTimeoutError`