Skip to content

Commit 87bfe71

Browse files
committed
Extra logging
1 parent f0e0fb8 commit 87bfe71

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

lambdas/api-handler/src/handlers/patch-letter.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ export default function createPatchLetterHandler(
5757
throw typedError;
5858
}
5959

60+
deps.logger.info({
61+
description: "Received patch letter request",
62+
supplierId: commonIds.value.supplierId,
63+
letterId,
64+
newStatus: patchLetterRequest.data.attributes.status,
65+
correlationId: commonIds.value.correlationId,
66+
});
67+
6068
const updateLetterCommand: UpdateLetterCommand = mapToUpdateCommand(
6169
patchLetterRequest,
6270
commonIds.value.supplierId,

lambdas/api-handler/src/handlers/post-letters.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ export default function createPostLettersHandler(
5858
throw typedError;
5959
}
6060

61+
deps.logger.info({
62+
description: "Received post letters request",
63+
supplierId: commonIds.value.supplierId,
64+
letterIds: postLettersRequest.data.map((letter) => letter.id),
65+
correlationId: commonIds.value.correlationId,
66+
});
67+
6168
if (postLettersRequest.data.length > maxUpdateItems) {
6269
throw new ValidationError(
6370
ApiErrorDetail.InvalidRequestLettersToUpdate,

0 commit comments

Comments
 (0)