Skip to content

Commit 77c9fb4

Browse files
authored
Update documentation for add_failure method
Use ..Default::default() in add_failure
1 parent f302319 commit 77c9fb4

File tree

1 file changed

+3
-0
lines changed
  • lambda-events/src/event/streams

1 file changed

+3
-0
lines changed

lambda-events/src/event/streams/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ impl KinesisEventResponse {
2424
/// register individual record failures. Lambda will automatically retry failed
2525
/// records while successfully processed records will be checkpointed.
2626
///
27+
/// Besides `item_identifiers`, the generated struct will use default field values for [`KinesisBatchItemFailure`].
28+
///
2729
/// **Important**: This feature requires `FunctionResponseTypes: ReportBatchItemFailures`
2830
/// to be enabled in your Lambda function's Kinesis event source mapping configuration.
2931
/// Without this setting, Lambda will retry the entire batch on any failure.
@@ -32,6 +34,7 @@ impl KinesisEventResponse {
3234
item_identifier: Some(item_identifier.into()),
3335
#[cfg(feature = "catch-all-fields")]
3436
other: serde_json::Map::new(),
37+
..Default::default(),
3538
});
3639
}
3740

0 commit comments

Comments
 (0)