Repository navigation
fix: show supplementary API error messages on stderr - #377
petebacondarwin wants to merge 2 commits into
Conversation
commit: |
|
LGTM |
|
| mean | stddev | min | max | |
|---|---|---|---|---|
| PR | 163.7 ms | 3.4 ms | 157.0 ms | 169.8 ms |
| base | 169.2 ms | 2.9 ms | 163.7 ms | 173.0 ms |
Δ (PR vs base): ↓ -5.5 ms (-3.3%)
Measured with hyperfine on ubuntu-latest (3 warmup runs, 20 timed runs). CI numbers carry ±a few ms of runner jitter; treat small deltas as noise.
|
✅ Approved — No problems found. Failed envelopes now reach the renderer as The decision is advisory: this comment never approves, blocks or requests changes on the pull request. ✅ All checks passed🚀 Release: ✅ LGTMRisk: Low. A 🔒 Security: ✅ LGTMNo security concerns. The extra API text only goes to stderr. Telemetry still extracts numeric error codes only. 📖 AGENTS.md: ✅ LGTMThis pull request does not change any agent instruction files. The change follows the repository's rule against per-code error switches in 📋 Code Quality: ✅ LGTMI found no defects in the changed code or in the code that calls it.
⚡ Performance: ✅ LGTMNo performance concerns. 📝 Documentation: ✅ LGTMThe updated Reviewed commit: |
|
🤖 I've done a thorough review of your PR. Adds rendering for supplementary API envelope messages and preserves failed 2xx envelope metadata.
|
Failed API responses can put validation details in the envelope's
messagesarray. cf currently displays onlyerrors, leaving users with an opaque identifier such asposture.api.parameter.missingand no explanation of which parameter is missing.Render
messagesaftererrorsin the same stderr report, without adding an[error]label to supplemental text that has no code. Preserve the full envelope and response metadata forsuccess: falseresponses returned with HTTP 200, including envelopes withoutresult, so their details reach the renderer too. Keep the fallback message concise when an envelope has no usable details. Successful-response notices and stdout output remain unchanged. Includes regression coverage and a patch changeset.Validation:
pnpm check