{"record":{"id":"889fb861a7904263","repo":"vectordotdev/vector","slug":"response-failed","errorCode":null,"errorMessage":"Response failed.","messagePattern":"Response failed\\.","errorType":"console","errorClass":"CallError","httpStatus":null,"severity":"error","filePath":"src/sinks/util/sink.rs","lineNumber":459,"sourceCode":"            message = \"Submitting service request.\",\n            in_flight_requests = self.in_flight.len()\n        );\n        let events_sent = register!(EventsSent::from(Output(None)));\n        self.service\n            .call(items)\n            .err_into()\n            .map(move |result| {\n                let status = result_status(&result);\n                finalizers.update_status(status);\n                match status {\n                    EventStatus::Delivered => {\n                        events_sent.emit(CountByteSize(count, json_byte_size));\n                        // TODO: Emit a BytesSent event here too\n                    }\n                    EventStatus::Rejected => {\n                        // Emit the `Error` and `EventsDropped` internal events.\n                        // This scenario occurs after retries have been attempted.\n                        let error = result.err().unwrap_or_else(|| \"Response failed.\".into());\n                        emit!(CallError {\n                            error,\n                            request_id,\n                            count,\n                        });\n                    }\n                    _ => {} // do nothing\n                }\n\n                // If the rx end is dropped we still completed\n                // the request so this is a weird case that we can\n                // ignore for now.\n                _ = tx.send(());\n            })\n            .instrument(info_span!(\"request\", %request_id).or_current())\n            .boxed()\n    }\n","sourceCodeStart":441,"sourceCodeEnd":477,"githubUrl":"https://github.com/vectordotdev/vector/blob/3708c39b12a93212ed8b8d7510b4cc7769cb5864/src/sinks/util/sink.rs#L441-L477","documentation":"'Response failed.' is the fallback error string Vector emits in the internal CallError event when a sink request's result is classified as EventStatus::Rejected but result.err() is None — i.e., the underlying service actually returned a Response, yet the response was judged a rejection (typically an HTTP 4xx/5xx or a service-level rejection after retries were exhausted). It surfaces in logs/internal events as an Error with EventsDropped: events from that batch are dropped. The generic wording means the concrete failure detail was lost at the result_status layer.","triggerScenarios":"A sink's Service::call returns Ok(response) where the response maps to Rejected (for example an HTTP 4xx like 400/413 or a 5xx that is not retryable, or a retry budget exhausted so the request future completes with a terminal rejected status). At src/sinks/util/sink.rs:459, result.err() is None, so 'Response failed.' replaces the missing error text in the emitted CallError.","commonSituations":"Destination rejecting payloads: HTTP sink receiving 400 (malformed batch), 401/403 (bad credentials), 413 (batch too large), or 429/5xx after retries and backoff give up; rate limits on the target; auth tokens expired; content encoding mismatch between sink and endpoint. Users see the error via `vector tap`/logs and component_errors_received / events dropped counters rising while events flow.","solutions":["Inspect the sink target directly: confirm credentials, endpoint URL, and that the service accepts the payload shape (reproduce with curl) — 4xx responses are the most common cause of a Rejected status.","Raise retry patience and shrink batches: increase request.retry_max_duration_secs / acknowledgements settings, and lower batch.max_bytes/batch.timeout_secs so oversized or rate-limited batches fail less.","Watch the internal metrics/logs around the CallError (component_errors_received, events_in, events_out) to identify which sink id and request it is, then test that sink alone with a minimal config.","If the message appears with Ok responses, capture debug logs (LOG=debug or api GraphQL) for the request status to see the real HTTP status the Response carried, and report missing detail upstream — the fallback string indicates lost error context."],"exampleFix":"# before — sink rejects after short default retries, batches too large\nsinks:\n  out:\n    type: http\n    inputs: [\"my_transform\"]\n    uri: https://api.example.com/ingest\n    batch:\n      max_bytes: 5000000\n\n# after — smaller batches + longer retry window so transient rejections recover\nsinks:\n  out:\n    type: http\n    inputs: [\"my_transform\"]\n    uri: https://api.example.com/ingest\n    batch:\n      max_bytes: 1000000\n      timeout_secs: 1\n    request:\n      retry_max_duration_secs: 30","handlingStrategy":"validation","validationCode":"# Pre-flight the sink endpoint exactly like the healthcheck will:\ncurl -sS -o /dev/null -w '%{http_code}\\n' \\\n  -H \"Authorization: <same credentials as sink>\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"events\":[]}' \\\n  https://api.example.com/ingest\n# 2xx => endpoint accepts; 4xx/5xx here predicts Rejected batches at runtime.\n\n# And validate the full topology with healthchecks enabled:\nvector validate /etc/vector/vector.yaml","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run `vector validate` (with healthchecks) against staging before deploying so rejected endpoints surface pre-rollout.","Keep sink retry settings generous for transient failures (request.retry_max_duration_secs) and batch sizes within the endpoint's limits (batch.max_bytes).","Monitor internal events and counters (component_errors_received, dropped events) per sink so rejections are caught by alerting instead of discovered via lost data.","Rotate/validate credentials before expiry — 401/403 responses arrive as Ok-but-Rejected responses and produce this generic message."],"tags":["vector","sink","http","delivery","dropped-events","internal-events"],"backgroundTag":"sink-request-rejected","analyzedSha":"3708c39b12a93212ed8b8d7510b4cc7769cb5864","analyzedAt":"2026-08-20T07:02:18.786Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}