Commit 5b8a661
Standardize exception type and document return for query()
Per copilot review on PR #253:
- Re-raise the catch-all 4xx/5xx as ValueError with status/reason/url
for parity with the explicit 400/404/414/500/502/503 branches; callers
no longer need to handle both ValueError and HTTPError from the same
helper.
- Update the Returns section to document the actual return type
(requests.Response) and the ValueError raise contract.
- Narrow the test from pytest.raises(Exception) to pytest.raises(
ValueError) with a match on the status code to assert the contract.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c71b865 commit 5b8a661
2 files changed
Lines changed: 18 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
177 | 186 | | |
178 | 187 | | |
179 | 188 | | |
| |||
214 | 223 | | |
215 | 224 | | |
216 | 225 | | |
217 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
218 | 232 | | |
219 | 233 | | |
220 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
0 commit comments