{"record":{"id":"e9bf1a2bc75fa37b","repo":"vectordotdev/vector","slug":"unable-to-load-exact-documentation-search-index-response","errorCode":null,"errorMessage":"Unable to load exact documentation search index: ${response.status}","messagePattern":"Unable to load exact documentation search index: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"website/layouts/partials/javascript/search.html","lineNumber":49,"sourceCode":"{{ end }}\n\n{{ $functionsURL := \"/docs/reference/vrl/functions/\" | relURL }}\n{{ range site.Data.docs.remap.functions }}\n  {{ $exactSearchRecords = $exactSearchRecords | append (dict\n    \"aliases\" (slice .name)\n    \"category\" \"VRL function\"\n    \"content\" (.description | markdownify | plainify)\n    \"title\" .name\n    \"url\" (printf \"%s#%s\" $functionsURL .anchor)) }}\n{{ end }}\n\n{{ $exactSearchIndex := resources.FromString \"search/exact-docs.json\" ($exactSearchRecords | jsonify) | fingerprint \"sha256\" }}\n<script src=\"{{ $compiled.RelPermalink }}\"></script>\n<script type=\"module\">\n  window.loadExactSearch = async () => {\n    const response = await fetch(\"{{ $exactSearchIndex.RelPermalink }}\");\n    if (!response.ok) {\n      throw new Error(`Unable to load exact documentation search index: ${response.status}`);\n    }\n    return response.json();\n  };\n\n  window.loadPagefind = async () => {\n    const pagefind = await import(\"/pagefind/pagefind.js\");\n    await pagefind.init();\n    return pagefind;\n  };\n</script>\n","sourceCodeStart":31,"sourceCodeEnd":60,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/website/layouts/partials/javascript/search.html#L31-L60","documentation":"Panic from `.expect(\"all required builder params specified\")` on the aws-sdk-sqs `SendMessageBatchRequestEntry` builder in the deferred-message path of `run_once`. The builder's `build()` fails only when a required field (`id` or `message_body`) is missing. Both are set here, so the expect encodes an invariant; it firing means the code or SDK changed such that a required param is absent.","triggerScenarios":"Building a `SendMessageBatchRequestEntry` without `.id()` or `.message_body()`. At src/sources/aws_s3/sqs.rs:509 this triggers if `message.body.unwrap_or_default()` stops being called (e.g. refactor uses `message.body` which is `Option<String>`), or an aws-sdk upgrade adds a required field like a queue URL / delay seconds to the entry builder.","commonSituations":"aws-sdk-sqs major version bump changing builder required fields; refactoring the fan-out (S3 event pointing to another queue) path and dropping the `.message_body(...)` setter; passing an empty message body deliberately which is fine, versus accidentally passing no body.","solutions":["Ensure `.id(message_id.clone())` and `.message_body(...)` are both chained before `.build()` after any refactor.","Diff the aws-sdk-sqs builder API for `SendMessageBatchRequestEntry` against the pinned version and add any newly required setters.","Replace the expect with error handling that emits a `SqsMessageProcessingError`/skip instead of aborting the SQS polling loop."],"exampleFix":"// before\nSendMessageBatchRequestEntry::builder()\n    .id(message_id.clone())\n    .message_body(message.body.unwrap_or_default())\n    .build()\n    .expect(\"all required builder params specified\")\n// after\nmatch SendMessageBatchRequestEntry::builder()\n    .id(message_id.clone())\n    .message_body(message.body.unwrap_or_default())\n    .build()\n{\n    Ok(entry) => entry,\n    Err(e) => { emit!(SqsMessageProcessingError{..}); continue; }\n}","handlingStrategy":"validation","validationCode":"fn valid_send_entry(id: &str, body: &str) -> bool {\n    !id.is_empty() && !body.is_empty()\n}","typeGuard":"fn body_of(m: Message) -> String { m.body.unwrap_or_default() }","tryCatchPattern":"match SendMessageBatchRequestEntry::builder().id(id).message_body(body).build() {\n    Ok(entry) => deferred_entries.push(entry),\n    Err(e) => { emit!(SqsMessageProcessingError { .. }); continue; }\n}","preventionTips":["Keep `.id()` and `.message_body()` setters adjacent to `.build()` so refactors cannot orphan them.","Re-verify builder required fields whenever bumping aws-sdk-sqs.","Cover the deferred/fan-out path in tests, not just the main path."],"tags":["aws","sqs","rust","panic","builder-pattern"],"backgroundTag":"missing-required-argument","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"}