-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hi, I'm using Elastic APM in our node projects and I found it lose stack trace when an async function throws an error. In the source code I found the error stack is first handled by stackman, and the frames will lose "From previous event" part. I found if frames length is 0, error will be handled by error-stack-parser, and the error stack can be parsed correctly.
So can the stckman also add this feature? Async functions are very commonly in node.js.
code like this:
const id = someAsyncFunction();
anotherFunction(id);error like this:
nodejs.unhandledRejectionError: Invalid value Promise { <pending> }
at Object.escape (/node_modules/sequelize/lib/sql-string.js:65:11)
......
at processImmediate (internal/timers.js:439:21)
From previous event:
at Function.findAll (/node_modules/sequelize/lib/model.js:1755:8)
......
name: "unhandledRejectionError"
Metadata
Metadata
Assignees
Labels
No labels