Skip to content

Commit d8db90f

Browse files
add logs to upsert lambda
1 parent ccea30d commit d8db90f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lambdas/upsert-letter/src/handler/upsert-handler.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ function resolveSupplierForVariant(
108108
}
109109

110110
function parseSNSNotification(record: SQSRecord) {
111+
console.log("record in parseSNSNotificatino: ", record);
111112
const notification = JSON.parse(record.body) as Partial<SNSMessage>;
112113
if (
113114
notification.Type !== "Notification" ||
@@ -149,9 +150,11 @@ export default function createUpsertLetterHandler(deps: Deps): SQSHandler {
149150
const batchItemFailures: SQSBatchItemFailure[] = [];
150151

151152
const tasks = event.Records.map(async (record) => {
153+
console.log("record in createUpsertLetterHandler: ", record);
152154
try {
153155
const message: string = parseSNSNotification(record);
154156

157+
console.log("message after parsing: ", message);
155158
const letterEvent: unknown = JSON.parse(message);
156159

157160
const type = getType(letterEvent);

0 commit comments

Comments
 (0)