Skip to content

Commit

Permalink
fix: drop expect batch (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos authored Nov 29, 2023
1 parent c62f758 commit e1e9cc8
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ Sentry.AWSLambda.init({
* @param {import('aws-lambda').SQSEvent} sqsEvent
*/
async function handleBufferQueueMessage (sqsEvent) {
// if one we should put back in queue
if (sqsEvent.Records.length === 1) {
return {
batchItemFailures: sqsEvent.Records.map(r => ({
itemIdentifier: r.messageId
}))
}
}

// unexpected number of records
if (sqsEvent.Records.length !== 2) {
return {
Expand Down

0 comments on commit e1e9cc8

Please sign in to comment.