@@ -81,3 +81,15 @@ let sdk_config = aws_config::from_env()
references=["aws-sdk-rust#237","smithy-rs#1770"]
meta={"breaking"=false,"tada"=true,"bug"=false}
author="jdisanti"
[[aws-sdk-rust]]
message="Paginators now stop on encountering a duplicate token by default rather than panic. This behavior can be customized by toggling the `stop_on_duplicate_token` property on the paginator before calling `send`."
references=["aws-sdk-rust#620","smithy-rs#1748"]
meta={"breaking"=false,"tada"=false,"bug"=true}
author="jdisanti"
[[smithy-rs]]
message="Paginators now stop on encountering a duplicate token by default rather than panic. This behavior can be customized by toggling the `stop_on_duplicate_token` property on the paginator before calling `send`."
@@ -179,12 +192,12 @@ class PaginatorGenerator private constructor(
Ok(ref resp) => {
let new_token = #{output_token}(resp);
let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true);
if !is_empty && new_token == input.$inputTokenMember.as_ref() {
let _ = tx.send(Err(#{SdkError}::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
if !is_empty && new_token == input.$inputTokenMember.as_ref() && self.stop_on_duplicate_token {