{"record":{"id":"63b636f5856ef1e3","repo":"vectordotdev/vector","slug":"should-not-fail-to-send-output-event","errorCode":null,"errorMessage":"should not fail to send output event","messagePattern":"should not fail to send output event","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/components/validation/resources/http.rs","lineNumber":387,"sourceCode":"\n                                            // Update the runner metrics for the received events. This will later\n                                            // be used in the Validators, as the \"expected\" case.\n                                            output_runner_metrics.received_bytes_total +=\n                                                byte_size as u64;\n\n                                            output_runner_metrics.received_events_total +=\n                                                events.len() as u64;\n\n                                            events.iter().for_each(|event| {\n                                                output_runner_metrics.received_event_bytes_total +=\n                                                    event.estimated_json_encoded_size_of().get()\n                                                        as u64;\n                                            });\n\n                                            output_tx\n                                                .send(events.to_vec())\n                                                .await\n                                                .expect(\"should not fail to send output event\");\n                                        }\n                                    }\n                                    Ok(None) => {\n                                        if should_reject {\n                                            // This status code is not retried and should result in the component under test\n                                            // emitting error events\n                                            return StatusCode::BAD_REQUEST.into_response();\n                                        } else {\n                                            return StatusCode::OK.into_response();\n                                        }\n                                    }\n                                    Err(_) => {\n                                        error!(\n                                            \"HTTP server failed to decode body: {:?}\",\n                                            String::from_utf8_lossy(&body)\n                                        );\n                                        return StatusCode::INTERNAL_SERVER_ERROR.into_response();\n                                    }","sourceCodeStart":369,"sourceCodeEnd":405,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/src/components/validation/resources/http.rs#L369-L405","documentation":"The validation output HTTP server collects the events a component emitted and forwards them to the test harness via an mpsc `output_tx.send(...).await`, expecting the receiving half to still be alive. A panic here means the channel receiver was dropped while the HTTP server was still delivering results — the harness shut down unexpectedly.","triggerScenarios":"`spawn_output_http_server` processing a component's POST of output events, then trying to send the events over the internal channel after the harness's receiver was dropped (test completed/aborted or panicked concurrently).","commonSituations":"The component under test sends output after the validation run finished; a crash/timeout elsewhere in the harness dropped the receiver first; test-case timing issues causing late deliveries.","solutions":["Check the validation run logs for an earlier harness panic/timeout that shut the receiver down early","Ensure the component under test stops sending output before the test concludes (no trailing async emits)","Increase test timeouts if the component's output delivery races with harness shutdown","Update Vector and report if reproducible"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// On the harness side, keep the receiver alive for the whole server lifetime\n// and tolerate late sends:\nwhile let Some(events) = output_rx.recv().await {\n    if harness_active { record(events); }\n}","preventionTips":["Don't drop the output channel receiver while the HTTP server is running","Ensure components finish emitting before test teardown","Use adequate test timeouts so teardown doesn't race deliveries"],"tags":["rust","validation","http","channel","tokio"],"backgroundTag":"broken-pipe","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"}