Commit 814b427
committed
[cueweb] Fix addsubscriber proxy: propagate HTTP status, drop JSON round-trip
- handleRoute now receives the parsed body once - removed the redundant JSON.stringify(await request.json()) + JSON.parse() pair.
- HTTP status now travels via NextResponse.json's second argument ({ status: response.status }) instead of sitting inside the body, so non-2xx upstream responses surface as non-2xx to the caller.
- Error path uses responseData?.error ?? 'Upstream error' to stay null-safe, matching the addcomment route's pattern.1 parent 02a8668 commit 814b427
1 file changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
43 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
0 commit comments