Orlando
04/21/2022, 4:37 PMthdxr
04/21/2022, 4:38 PMOrlando
04/21/2022, 4:38 PMthdxr
04/21/2022, 4:40 PMOrlando
04/21/2022, 4:44 PMimport Sentry from "@sentry/serverless";
import type { SQSHandler, EventBridgeEvent } from 'aws-lambda';
export const main: SQSHandler = Sentry.AWSLambda.wrapHandler(async (evt) => {
evt.Records.map(({ body }) => {
console.log(body);
//TODO: handle error
}
)});
This one goes from queue to lambda. Also did a quick test on this where it got stuck too.
import Sentry from "@sentry/serverless";
export const handler = Sentry.AWSLambda.wrapHandler(async (event) => {
return {
statusCode: 200,
headers: { "Content-Type": "text/plain" },
body: `Hello, World! Your request was received at ${event.requestContext.time}.`,
};
});
Frank
Frank
Orlando
04/21/2022, 4:53 PMOrlando
04/21/2022, 6:47 PMthdxr
04/21/2022, 6:48 PMthdxr
04/21/2022, 6:48 PMOrlando
04/21/2022, 8:55 PMERROR Runtime.UnhandledPromiseRejection: TypeError: Cannot read properties of undefined (reading 'AWSLambda')
thdxr
04/21/2022, 9:06 PMthdxr
04/21/2022, 9:07 PMOrlando
04/21/2022, 9:14 PM