Skip to content

Commit 143b1af

Browse files
committed
Fixed parsing of json messages on falure.
1 parent 5ee336c commit 143b1af

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

failedBatchReprocessingLambda.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function handleSNS(event, context) {
9191
context.done("Unsupported event version " + event.EventVersion);
9292
}
9393

94-
var message = event.Records[0].Sns.Message;
94+
var message = JSON.parse(event.Records[0].Sns.Message);
9595

9696
// parse out the body of the error from the previous invocation
9797
if (!message.error) {

reprocessBatch.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ batchOperations.reprocessBatch(prefix, thisBatchId, setRegion, omitFiles, functi
3939
console.log(err);
4040
process.exit(ERROR);
4141
} else {
42+
console.log("Batch files marked for reprocessing successfully");
4243
process.exit(OK);
4344
}
4445
});

0 commit comments

Comments
 (0)