Commit 037424f
committed
fix(API): log staging commit errors via winston instead of stderr
The commit endpoint's catch block used console.trace, which writes to
stderr and never reaches the structured winston log files. This made
400 responses from POST /v1/staging/commit opaque in logs, forcing
operators to correlate with pm2/journald output to find the root
cause. Route the error through the existing logger so the reason
lands in combined.log and error.log alongside the request metadata.1 parent e2ac103 commit 037424f
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
113 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
| |||
0 commit comments