Repository navigation
Commit 2519f90
committed
fix(api-errors): keep 4xx lower bound; drop redundant 500 check
The earlier `if status < 500` simplification was behaviour-changing: after
the `status >= 500` early return the upper bound is always true (CodeQL
"redundant comparison" + "unreachable code" on the `return "api"` fallback),
but dropping the `>= 400` lower bound also routed sub-400 statuses (e.g. the
`status=0` default for non-HTTP-ish errors) into `4xx_client` instead of the
generic `api` bucket. Use `if status >= 400` — equivalent to the original
`400 <= status < 500` given the preceding return, with the `api` fallback
reachable again for status < 400.
Also parenthesize the remaining sparse plan-mode reminder concatenation so
CodeQL's implicit-string-concatenation check stays quiet without splitting
the line across the rendered output.1 parent e66f43f commit 2519f90
2 files changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
| |||
0 commit comments