Skip to content

Commit 118b735

Browse files
committed
feat: throwOnFullBatchFailure option for BatchProcessingOptions
1 parent 1e8ffed commit 118b735

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/batch/src/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { BasePartialBatchProcessor } from './BasePartialBatchProcessor.js';
1313
* @template T The type of the batch processor, defaults to BasePartialBatchProcessor
1414
* @property context The context object provided by the AWS Lambda runtime
1515
* @property skipGroupOnError The option to group on error during processing
16+
* @property throwOnFullBatchFailure The option to throw an error if the entire batch fails
1617
*/
1718
type BatchProcessingOptions<T = BasePartialBatchProcessor> = {
1819
/**
@@ -25,6 +26,10 @@ type BatchProcessingOptions<T = BasePartialBatchProcessor> = {
2526
* If true skip the group on error during processing.
2627
*/
2728
skipGroupOnError?: T extends SqsFifoPartialProcessor ? boolean : never;
29+
/**
30+
* Set this to false to prevent throwing an error if the entire batch fails.
31+
*/
32+
throwOnFullBatchFailure?: boolean;
2833
};
2934

3035
/**

0 commit comments

Comments
 (0)