From f4d1dbcbe25fe0340e7f3fd815f33157b50a81e1 Mon Sep 17 00:00:00 2001 From: sudabg <143158885+sudabg@users.noreply.github.com> Date: Sun, 15 Mar 2026 15:48:39 +0800 Subject: [PATCH] fix: logerror now preserves Error.cause and custom properties Change console.error(err.stack || err.toString()) to console.error(err) to preserve Error.cause, async stack traces, and custom error properties (e.g. Sequelize's parent/original). 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); } /**