Skip to content

Commit ef7a5cf

Browse files
committed
docs: note DecodeError in the README response_model paragraph
One-line addition: response_model= decode failures raise httpware.DecodeError (a ClientError subclass), so the standard except httpware.ClientError catches them.
1 parent 2ded92d commit ef7a5cf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ with Client(base_url="https://example.test") as client:
4949
print(response.json())
5050
```
5151

52-
Typed decoding via `response_model=` works in both worlds — requires `pip install httpware[pydantic]`:
52+
Typed decoding via `response_model=` works in both worlds — requires `pip install httpware[pydantic]`. Decode failures (malformed body, schema mismatch) raise `httpware.DecodeError`, a `ClientError` subclass — so `except httpware.ClientError` covers them alongside transport and status errors.
5353

5454
```python
5555
from httpware import AsyncClient

0 commit comments

Comments
 (0)