Commit 4c937d7
* Prevent PydanticUserError when ApiClient.send has no return type
Short-circuit and return None before constructing TypeAdapter when
type_ is None (e.g. 204 No Content endpoints). TypeAdapter(None) raises
PydanticUserError, and returning None matches the existing overloads.
Closes #90
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* Accept 204 No Content in ApiClient.send
Add 204 to the success status codes and short-circuit to None for it
so void endpoints stop raising UnexpectedResponse.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 1a0e1b5 commit 4c937d7
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
802 | 802 | | |
803 | 803 | | |
804 | 804 | | |
805 | | - | |
| 805 | + | |
806 | 806 | | |
807 | 807 | | |
| 808 | + | |
| 809 | + | |
808 | 810 | | |
809 | 811 | | |
810 | 812 | | |
811 | | - | |
| 813 | + | |
812 | 814 | | |
813 | 815 | | |
814 | 816 | | |
| |||
0 commit comments