Skip to content

Commit 441546f

Browse files
committed
CCM-12740: add extra detail in invalid record error message
1 parent 1437f9f commit 441546f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lambdas/ttl-handle-expiry-lambda/src/__tests__/apis/dynamodb-stream-handler.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ describe('createHandler', () => {
158158

159159
expect(logger.error).toHaveBeenCalledWith({
160160
description: 'Non-REMOVE event or missing OldImage',
161+
record: mockInsertEvent.Records[0],
161162
});
162163

163164
expect(eventPublisher.sendEvents).not.toHaveBeenCalled();
@@ -190,6 +191,7 @@ describe('createHandler', () => {
190191

191192
expect(logger.error).toHaveBeenCalledWith({
192193
description: 'Non-REMOVE event or missing OldImage',
194+
record: mockNoOldImageEvent.Records[0],
193195
});
194196

195197
expect(eventPublisher.sendEvents).not.toHaveBeenCalled();

lambdas/ttl-handle-expiry-lambda/src/apis/dynamodb-stream-handler.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export const createHandler = ({
3838
// This shouldn't happen unless the stream filter has been changed.
3939
logger.error({
4040
description: 'Non-REMOVE event or missing OldImage',
41+
record
4142
});
4243

4344
return;

0 commit comments

Comments
 (0)