{"record":{"id":"2d14403f98a27c9f","repo":"vectordotdev/vector","slug":"all-required-builder-parameters-specified","errorCode":null,"errorMessage":"all required builder parameters specified","messagePattern":"all required builder parameters specified","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/sources/aws_sqs/source.rs","lineNumber":207,"sourceCode":"        Some(\n            Utc.timestamp_millis_opt(i64::from_str(sent_time_str).ok()?)\n                .single()\n                .expect(\"invalid timestamp\"),\n        )\n    })\n}\n\nasync fn delete_messages(client: SqsClient, receipts: Vec<String>, queue_url: String) {\n    if !receipts.is_empty() {\n        let mut batch = client.delete_message_batch().queue_url(queue_url);\n\n        for (id, receipt) in receipts.into_iter().enumerate() {\n            batch = batch.entries(\n                DeleteMessageBatchRequestEntry::builder()\n                    .id(id.to_string())\n                    .receipt_handle(receipt)\n                    .build()\n                    .expect(\"all required builder parameters specified\"),\n            );\n        }\n        if let Err(err) = batch.send().await {\n            emit!(SqsMessageDeleteError { error: &err });\n        }\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use chrono::SecondsFormat;\n    use vector_lib::lookup::path;\n\n    use super::*;\n    use crate::{\n        codecs::DecodingConfig,\n        config::{SourceConfig, log_schema},\n        sources::aws_sqs::AwsSqsConfig,","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/src/sources/aws_sqs/source.rs#L189-L225","documentation":"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.","triggerScenarios":"Thrown at src/sources/aws_sqs/source.rs:207 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["If this ever fires, inspect the receipts vector for empty strings and filter them before building entries","Guard receipt handles with a non-empty check before adding them to the delete batch"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}