Bug: getErrorTrace(error) is undefined on custom errors
Describe the bug TypeError undefined is not an object (evaluating 'getErrorTrace(error).map') on custom errors
To Reproduce Steps to reproduce the behavior:
console.log(err, String(err), String(typeof err));
logger.error(
Error in custom middleware: ${middleware}:,
err
);
Output: (The console.log) ConnectionRefused: Unable to connect. Is the computer able to access the url? path: "http://localhost:3000/user" ConnectionRefused: Unable to connect. Is the computer able to access the url? object
(The Bug)
TypeError undefined is not an object (evaluating 'getErrorTrace(error).map'), 58, 45, 58, 45, node_modules/tslog/dist/esm/runtime/nodejs/index.js
error stack:
• index.js prettyFormatErrorObj
node_modules/tslog/dist/esm/runtime/nodejs/index.js:87
• index.js
Expected behavior Ignore the error or print without pretty mode.
Bun Version 1.1.12
OS incl. Version macOS 15.2