Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors have wrong callstack #69

Open
BryanCrotaz opened this issue Sep 27, 2019 · 5 comments
Open

errors have wrong callstack #69

BryanCrotaz opened this issue Sep 27, 2019 · 5 comments
Assignees

Comments

@BryanCrotaz
Copy link

Reported error on a lambda log uses the callstack of the iopipe catch block, instead of the call stack of the original error, ie where it was thrown from.

Error: "user code error message here"
    at Report._callee$ (/opt/nodejs/node_modules/@iopipe/core/dist/iopipe.js:4982:62)
    at tryCatch (/opt/nodejs/node_modules/@iopipe/core/dist/iopipe.js:2230:40)
    at Generator.invoke [as _invoke] (/opt/nodejs/node_modules/@iopipe/core/dist/iopipe.js:2464:22)
    at Generator.prototype.(anonymous function) [as next] (/opt/nodejs/node_modules/@iopipe/core/dist/iopipe.js:2282:21)
    at step (/opt/nodejs/node_modules/@iopipe/core/dist/iopipe.js:1011:30)
    at /opt/nodejs/node_modules/@iopipe/core/dist/iopipe.js:1029:14
    at new Promise (<anonymous>)
    at new F (/opt/nodejs/node_modules/@iopipe/core/dist/iopipe.js:143:28)
    at Report.<anonymous> (/opt/nodejs/node_modules/@iopipe/core/dist/iopipe.js:1008:12)
    at Report.prepare (/opt/nodejs/node_modules/@iopipe/core/dist/iopipe.js:5061:21)
    at IOpipeWrapperClass._callee2$ (/opt/nodejs/node_modules/@iopipe/core/dist/iopipe.js:1903:36)
    at tryCatch (/opt/nodejs/node_modules/@iopipe/core/dist/iopipe.js:2230:40)
    at Generator.invoke [as _invoke] (/opt/nodejs/node_modules/@iopipe/core/dist/iopipe.js:2464:22)
    at Generator.prototype.(anonymous function) [as next] (/opt/nodejs/node_modules/@iopipe/core/dist/iopipe.js:2282:21)
    at step (/opt/nodejs/node_modules/@iopipe/core/dist/iopipe.js:1011:30)
    at /opt/nodejs/node_modules/@iopipe/core/dist/iopipe.js:1022:13
    at <anonymous>
    at runMicrotasksCallback (internal/process/next_tick.js:121:5)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)
@mrickard mrickard self-assigned this Sep 27, 2019
@mrickard
Copy link
Contributor

Thank you for the report, @BryanCrotaz !

@mrickard
Copy link
Contributor

@BryanCrotaz Does this involve an error being supplied to context.fail? I also want to confirm if you've seen the correct error stack in your lambda logs before using context.fail. Thank you!

@BryanCrotaz
Copy link
Author

This is an uncaught exception that seems to be being caught by the global handler

@mrickard
Copy link
Contributor

mrickard commented Sep 27, 2019

Thanks! One more question: which version of iopipe-core are you using? (Or are you using our serverless layer?)

@mrickard
Copy link
Contributor

We've just released iopipe-js v1.17.0; can you see if this changes the behavior at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants