File tree Expand file tree Collapse file tree
lambdas/upsert-letter/src/handler Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ import {
1515import z from "zod" ;
1616import { MetricsLogger , Unit , metricScope } from "aws-embedded-metrics" ;
1717import { Deps } from "../config/deps" ;
18+ import { Deployment$ } from "@aws-sdk/client-api-gateway" ;
19+ import { de } from "zod/v4/locales" ;
1820
1921type SupplierSpec = { supplierId : string ; specId : string } ;
2022type PreparedEvents = LetterRequestPreparedEventV2 | LetterRequestPreparedEvent ;
@@ -175,7 +177,12 @@ export default function createUpsertLetterHandler(deps: Deps): SQSHandler {
175177 const tasks = event . Records . map ( async ( record ) => {
176178 let supplier = "unknown" ;
177179 try {
178- const queueMessage = JSON . parse ( record . body ) ;
180+ deps . logger . info ( {
181+ description : "Received message from SQS" ,
182+ messageId : record . messageId ,
183+ body : record . body ,
184+ } ) ;
185+ const queueMessage = JSON . parse ( JSON . parse ( record . body ) ) ;
179186
180187 const { letterEvent, supplierSpec } = queueMessage ;
181188
You can’t perform that action at this time.
0 commit comments