Skip to content

Commit

Permalink
Fix raise_for_status exception docs
Browse files Browse the repository at this point in the history
  • Loading branch information
johtso committed Apr 1, 2022
1 parent 550fff9 commit 8eba772
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8eba772

Please sign in to comment.