]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Fix raise_for_status exception docs (#2159)
authorJohannes <johtso@gmail.com>
Fri, 1 Apr 2022 15:06:24 +0000 (16:06 +0100)
committerGitHub <noreply@github.com>
Fri, 1 Apr 2022 15:06:24 +0000 (16:06 +0100)
Closes #2126

docs/exceptions.md

index 71c8a17e029940df472a23feed8a76d87546e780..d96e23ab0d987059035a27e1b4ea4f516f2ba112 100644 (file)
@@ -14,7 +14,7 @@ except httpx.RequestError as exc:
     print(f"An error occurred while requesting {exc.request.url!r}.")
 ```
 
-The `HTTPStatusError` class is raised by `response.raise_for_status()` on 4xx and 5xx responses.
+The `HTTPStatusError` class is raised by `response.raise_for_status()` on responses which are not a 2xx success code.
 These exceptions include both a `.request` and a `.response` attribute.
 
 ```python