Commit fa91616
Refactor
Replaced `except Exception:` with `except json.JSONDecodeError:` when
parsing `response.json()` to avoid swallowing unrelated errors and to
be explicit about the expected failure case (HTML/plaintext fallback).
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>handle_response to catch specific JSONDecodeError1 parent fe01ca2 commit fa91616
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | | - | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
0 commit comments