Commit e9105b3
committed
fix: harden response parsing and add missing None guards
- Guard int() on x-stack-actual-status header against malformed values
in _parse_response and both retry loops (ValueError falls back to
response.status_code)
- Validate response.json() returns dict before calling .get() on
known-error body (non-dict JSON falls back to empty dict)
- Add None guard to get_email_delivery_stats before model_validate
(matches pattern used by get_user, get_team, get_item)1 parent 131bb89 commit e9105b3
2 files changed
Lines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1369 | 1369 | | |
1370 | 1370 | | |
1371 | 1371 | | |
| 1372 | + | |
| 1373 | + | |
1372 | 1374 | | |
1373 | 1375 | | |
1374 | 1376 | | |
| |||
2707 | 2709 | | |
2708 | 2710 | | |
2709 | 2711 | | |
| 2712 | + | |
| 2713 | + | |
2710 | 2714 | | |
2711 | 2715 | | |
2712 | 2716 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
82 | 88 | | |
83 | 89 | | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
87 | | - | |
| 93 | + | |
| 94 | + | |
88 | 95 | | |
89 | 96 | | |
90 | 97 | | |
| |||
170 | 177 | | |
171 | 178 | | |
172 | 179 | | |
173 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
174 | 184 | | |
175 | 185 | | |
176 | 186 | | |
| |||
251 | 261 | | |
252 | 262 | | |
253 | 263 | | |
254 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
255 | 268 | | |
256 | 269 | | |
257 | 270 | | |
| |||
0 commit comments