vectordotdev/vector · error
errors ignored
Error message
errors ignored
What it means
`new_unchecked` builds a config graph without re-checking component names because they were validated earlier; the fallible `new_inner` result is asserted with `expect("errors ignored")`. The panic means the "already validated" assumption was violated and graph construction still failed.
Solutions
- Run the standard config validation (name checks) before calling `new_unchecked`.
- Switch to the checked constructor if building graphs outside the normal loading pipeline.
- Fix the component keys so they pass name validation.
Example fix
// before let graph = ConfigGraph::new_unchecked(&sources, &transforms, &sinks, schema, wildcard); // after validate_component_names(&sources, &transforms, &sinks)?; let graph = ConfigGraph::new_unchecked(&sources, &transforms, &sinks, schema, wildcard);
Defensive patterns
Strategy: validation
Validate before calling
// Before constructing the graph, validate identifiers:
for key in sources.keys().chain(transforms.keys()).chain(sinks.keys()) {
assert!(is_valid_component_name(&key.to_string()), "invalid component id: {key}");
} Try / catch
match ConfigGraph::new_inner(&sources, &transforms, &sinks, false, schema, wildcard) { Ok(g) => g, Err(errs) => { eprintln!("graph errors: {errs:?}"); std::process::exit(1); } } Prevention
- Always load configs through the standard pipeline (loader + validation) instead of building graphs directly.
- Run `vector validate` before `vector run` in CI.
- Keep component names lowercase alphanumeric with dashes/underscores.
When it happens
Trigger: Constructing a ConfigGraph from sources/transforms/sinks whose identifiers were never run through the normal name-validation pass, e.g. programmatic config building that skips validation.
Common situations: Embedding Vector's config library and building graphs directly; tests constructing outer-component maps by hand; refactors that weaken the earlier validation pass.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- can't be empty
- output didn't exist
- completing more than 2^16 data files at a time is obviously…
- {}
- config should not have any errors
AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16).
Data as JSON: /api/errors/82e1d093812a52a1.
Report an issue: GitHub.
Appendix: source
Thrown at src/config/graph.rs:85
pub fn new(
sources: &IndexMap<ComponentKey, SourceOuter>,
transforms: &IndexMap<ComponentKey, TransformOuter<String>>,
sinks: &IndexMap<ComponentKey, SinkOuter<String>>,
schema: schema::Options,
wildcard_matching: WildcardMatching,
) -> Result<Self, Vec<String>> {
Self::new_inner(sources, transforms, sinks, false, schema, wildcard_matching)
}
pub fn new_unchecked(
sources: &IndexMap<ComponentKey, SourceOuter>,
transforms: &IndexMap<ComponentKey, TransformOuter<String>>,
sinks: &IndexMap<ComponentKey, SinkOuter<String>>,
schema: schema::Options,
wildcard_matching: WildcardMatching,
) -> Self {
Self::new_inner(sources, transforms, sinks, true, schema, wildcard_matching)
.expect("errors ignored")
}
fn new_inner(
sources: &IndexMap<ComponentKey, SourceOuter>,
transforms: &IndexMap<ComponentKey, TransformOuter<String>>,
sinks: &IndexMap<ComponentKey, SinkOuter<String>>,
ignore_errors: bool,
schema: schema::Options,
wildcard_matching: WildcardMatching,
) -> Result<Self, Vec<String>> {
let mut graph = Graph::default();
let mut errors = Vec::new();
// First, insert all of the different node types
for (id, config) in sources.iter() {
graph.nodes.insert(
id.clone(),
Node::Source {View on GitHub (pinned to bdb87aeaa4)