You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
falsy reason in tests when using serverless AWSLambda.wrapHandler #3133
I'm writing tests for my lambda function but when I'm using @sentry/serverless and wrap my lambda function with AWSLambda.wrapHandler mocha shows Promise rejected with no or falsy reason.
IMO this is really bad, because it makes it almost impossible to know what the issue is without hunting around in the code, since there's no stack trace that'll point to this line.
Activity
G-Rath commentedon Apr 2, 2021
I hit upon a very similar issue that I suspect is the same - in my case, I was getting errors around it promises rejecting with just
false.The answer is that you have to call
Sentry.init();yourself - otherwise a client doesn't get initialized, which meansflushwill reject withfalse:sentry-javascript/packages/node/src/sdk.ts
Lines 134 to 140 in ce40962
IMO this is really bad, because it makes it almost impossible to know what the issue is without hunting around in the code, since there's no stack trace that'll point to this line.