vectordotdev/vector · error

all required builder parameters specified

Error message

all required builder parameters specified

What it means

Invariant note attached to DeleteMessageBatchRequestEntry construction in delete_messages: the builder only ever omits required fields if id or receipt_handle were not set, and the loop always supplies both (id from enumerate, receipt from the collected handle list), so the build cannot fail — the comment text explains why the unwrap-style usage is safe.

Solutions

  1. If this ever fires, inspect the receipts vector for empty strings and filter them before building entries
  2. Guard receipt handles with a non-empty check before adding them to the delete batch
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at src/sources/aws_sqs/source.rs:207 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16). Data as JSON: /api/errors/2d14403f98a27c9f. Report an issue: GitHub.

Appendix: source

Thrown at src/sources/aws_sqs/source.rs:207

        Some(
            Utc.timestamp_millis_opt(i64::from_str(sent_time_str).ok()?)
                .single()
                .expect("invalid timestamp"),
        )
    })
}

async fn delete_messages(client: SqsClient, receipts: Vec<String>, queue_url: String) {
    if !receipts.is_empty() {
        let mut batch = client.delete_message_batch().queue_url(queue_url);

        for (id, receipt) in receipts.into_iter().enumerate() {
            batch = batch.entries(
                DeleteMessageBatchRequestEntry::builder()
                    .id(id.to_string())
                    .receipt_handle(receipt)
                    .build()
                    .expect("all required builder parameters specified"),
            );
        }
        if let Err(err) = batch.send().await {
            emit!(SqsMessageDeleteError { error: &err });
        }
    }
}

#[cfg(test)]
mod tests {
    use chrono::SecondsFormat;
    use vector_lib::lookup::path;

    use super::*;
    use crate::{
        codecs::DecodingConfig,
        config::{SourceConfig, log_schema},
        sources::aws_sqs::AwsSqsConfig,

View on GitHub (pinned to bdb87aeaa4)