Commit 7529ea8
committed
fix(webapp): preserve preexisting 400 status in two catches, just hide leak
The previous sweep collapsed two existing 400 branches to 500 along with
the leak-sanitization. Keep the 400 status — the inner branches were
catching errors that callers had been informed of via 400, and clients
may depend on that. Just replace the leaky `error.message` body with a
generic per-route message.
- api.v1.orgs.$orgParam.projects.ts (createProject failure): 500 → 400
with `"Failed to create project"`.
- api.v1.authorization-code.ts (instanceof Error branch): 500 → 400 with
`"Failed to create authorization code"`.
Both branches probed locally: synthetic failure forces the path and the
response is the documented 400 + generic body.1 parent 1c88aed commit 7529ea8
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
0 commit comments