refactor(core): Hide stack trace for warning-level errors (#12411)

This commit is contained in:
Iván Ovejero
2025-01-02 17:48:39 +01:00
committed by GitHub
parent 5b925bcf10
commit 3ff902feb9
3 changed files with 31 additions and 1 deletions

View File

@@ -29,7 +29,10 @@ export class ErrorReporter {
const context = executionId ? ` (execution ${executionId})` : '';
do {
const msg = [e.message + context, e.stack ? `\n${e.stack}\n` : ''].join('');
const msg = [
e.message + context,
e instanceof ApplicationError && e.level === 'error' && e.stack ? `\n${e.stack}\n` : '',
].join('');
const meta = e instanceof ApplicationError ? e.extra : undefined;
this.logger.error(msg, meta);
e = e.cause as Error;