From 29f7fcbe9191c85bf22a1885b5dce52b0a0b2610 Mon Sep 17 00:00:00 2001 From: wdsmini Date: Fri, 20 Mar 2026 11:19:23 +0800 Subject: [PATCH] fix(application): preserve error details in logError Change console.error(err.stack || err.toString()) to console.error(err) to preserve error details like Error.cause, async stack traces, and custom error properties that are lost when only logging err.stack. Fixes #6462 --- lib/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/application.js b/lib/application.js index 47be2a20c1a..310e6dfef21 100644 --- a/lib/application.js +++ b/lib/application.js @@ -614,7 +614,7 @@ app.listen = function listen() { function logerror(err) { /* istanbul ignore next */ - if (this.get('env') !== 'test') console.error(err.stack || err.toString()); + if (this.get('env') !== 'test') console.error(err); } /**