(env: ErrorEnvelope)
| 35 | } |
| 36 | |
| 37 | function renderEnvelope(env: ErrorEnvelope): string { |
| 38 | const raw = env.error.raw_response |
| 39 | if (raw === undefined) |
| 40 | return JSON.stringify(env) |
| 41 | if (!isVerbose()) { |
| 42 | delete env.error.raw_response |
| 43 | return JSON.stringify(env) |
| 44 | } |
| 45 | env.error.raw_response = redactBearer(raw) |
| 46 | return JSON.stringify(env) |
| 47 | } |
| 48 | |
| 49 | // CLI-authored hint wins: it knows local remediation (e.g. which command to |
| 50 | // run); the server hint fills in when the CLI has nothing for this error. |
no test coverage detected