From 92932f543753e2a5d8793c5ddb70d2045e69f1e6 Mon Sep 17 00:00:00 2001 From: xiaoyou917813-max Date: Tue, 10 Mar 2026 18:46:02 +0400 Subject: [PATCH] Document exceptions raised by request() --- docs/user/quickstart.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index cef9e088d8..84b1ae843d 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -565,6 +565,12 @@ raised. If a request exceeds the configured number of maximum redirections, a :exc:`~requests.exceptions.TooManyRedirects` exception is raised. +Because :func:`requests.request()` is the underlying entry point for all +helper methods, the exceptions described above (and any other +:exc:`requests.exceptions.RequestException` subclasses) may be raised directly +by :func:`requests.request()` as well. Wrap calls to the helper functions or +:func:`requests.request()` itself if you need to handle those errors explicitly. + All exceptions that Requests explicitly raises inherit from :exc:`requests.exceptions.RequestException`.