diff --git a/CHANGES/7733.doc b/CHANGES/7733.doc new file mode 100644 index 00000000000..12d682a86df --- /dev/null +++ b/CHANGES/7733.doc @@ -0,0 +1 @@ +Fix, update, and improve client exceptions documentation. diff --git a/docs/client_reference.rst b/docs/client_reference.rst index df584b23d03..4c89351e841 100644 --- a/docs/client_reference.rst +++ b/docs/client_reference.rst @@ -2138,13 +2138,6 @@ Response errors .. deprecated:: 3.1 -.. class:: WSServerHandshakeError - - Web socket server response error. - - Derived from :exc:`ClientResponseError` - - .. class:: ContentTypeError Invalid content type. @@ -2165,6 +2158,13 @@ Response errors .. versionadded:: 3.2 + +.. class:: WSServerHandshakeError + + Web socket server response error. + + Derived from :exc:`ClientResponseError` + Connection errors ^^^^^^^^^^^^^^^^^ @@ -2191,14 +2191,6 @@ Connection errors Derived from :exc:`ClientConnectorError` -.. class:: UnixClientConnectorError - - Derived from :exc:`ClientConnectorError` - -.. class:: ServerConnectionError - - Derived from :exc:`ClientConnectionError` - .. class:: ClientSSLError Derived from :exc:`ClientConnectorError` @@ -2215,6 +2207,14 @@ Connection errors Derived from :exc:`ClientSSLError` and :exc:`ssl.CertificateError` +.. class:: UnixClientConnectorError + + Derived from :exc:`ClientConnectorError` + +.. class:: ServerConnectionError + + Derived from :exc:`ClientConnectionError` + .. class:: ServerDisconnectedError Server disconnected. @@ -2226,51 +2226,58 @@ Connection errors Partially parsed HTTP message (optional). -.. class:: ServerTimeoutError - - Server operation timeout: read timeout, etc. - - Derived from :exc:`ServerConnectionError` and :exc:`asyncio.TimeoutError` - .. class:: ServerFingerprintMismatch Server fingerprint mismatch. Derived from :exc:`ServerConnectionError` +.. class:: ServerTimeoutError + + Server operation timeout: read timeout, etc. + + Derived from :exc:`ServerConnectionError` and :exc:`asyncio.TimeoutError` + Hierarchy of exceptions ^^^^^^^^^^^^^^^^^^^^^^^ * :exc:`ClientError` - * :exc:`ClientResponseError` - - * :exc:`ContentTypeError` - * :exc:`WSServerHandshakeError` - * :exc:`~aiohttp.ClientHttpProxyError` - * :exc:`ClientConnectionError` * :exc:`ClientOSError` * :exc:`ClientConnectorError` - * :exc:`ClientSSLError` + * :exc:`ClientProxyConnectionError` + + * :exc:`ClientSSLError` - * :exc:`ClientConnectorCertificateError` + * :exc:`ClientConnectorCertificateError` - * :exc:`ClientConnectorSSLError` + * :exc:`ClientConnectorSSLError` - * :exc:`ClientProxyConnectionError` + * :exc:`UnixClientConnectorError` - * :exc:`ServerConnectionError` + * :exc:`ServerConnectionError` - * :exc:`ServerDisconnectedError` - * :exc:`ServerTimeoutError` + * :exc:`ServerDisconnectedError` * :exc:`ServerFingerprintMismatch` + * :exc:`ServerTimeoutError` + * :exc:`ClientPayloadError` + * :exc:`ClientResponseError` + + * :exc:`~aiohttp.ClientHttpProxyError` + + * :exc:`ContentTypeError` + + * :exc:`TooManyRedirects` + + * :exc:`WSServerHandshakeError` + * :exc:`InvalidURL`