Closed JohannesHome closed 4 years ago
Same issue, slightly different message:
const originalCallbacks = {
done: context.done.bind(context), // context is undefined
succeed: context.succeed.bind(context),
fail: context.fail.bind(context),
callback: callback,
};
2019-06-04T22:57:11.485Z bf16a167-5120-4089-8212-3feb3615a9ee TypeError: Cannot read property 'done' of undefined
at Object.master (/var/task/node_modules/serverless-sentry-lib/src/index.js:315:19)
at exports.handler (/var/src/handler.ts:8:23)
at invoke (/var/runtime/node_modules/awslambda/index.js:288:20)
at InvokeManager.start (/var/runtime/node_modules/awslambda/index.js:151:9)
at Object.awslambda.waitForInvoke (/var/runtime/node_modules/awslambda/index.js:499:52)
import * as RavenLambdaWrapper from 'serverless-sentry-lib';
import Raven from 'raven';
export const master = RavenLambdaWrapper.handler(Raven, async (event) => {
// code redacted, don't think it's important plus it's quite a lot
return {
statusCode: 200,
body: JSON.stringify({
...result,
master: {
duration
}
})
};
});
Will be fixed in next update
The sentry lib binds to the old callbacks provided through the context
These callbacks do not exist in my lambda Environment and they don't seem to be documented.
Stack trace of the error: