mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-11-16 17:09:09 +00:00
Validated in the full merge-train on the .113 (lot 3c, 2026-11-11): typecheck, static gates and the full unit suite. Every failure from that run was re-run in isolation, both on the merged tree and on the train base. They come from the .113 root environment, load-sensitive timing, or known flakes. None trace back to this change. Co-authored-by: Bl0ck <36800583+Bl0ck154@users.noreply.github.com>
9 lines
384 B
JavaScript
9 lines
384 B
JavaScript
/**
|
|
* Keep routine CLI failures readable. Operators can opt into stack traces
|
|
* locally with OMNIROUTE_DEBUG_STACK=1 when diagnosing unexpected failures.
|
|
*/
|
|
export function formatCliError(error, showStack = process.env.OMNIROUTE_DEBUG_STACK === "1") {
|
|
const message = error?.message || String(error);
|
|
return showStack && error?.stack ? String(error.stack) : String(message);
|
|
}
|