Skip to content

Commit

Permalink
Sigh
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed Sep 17, 2024
1 parent 1c0ce2c commit 00b9849
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/xds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,20 @@ impl Resource {
}
};

let json_value = crate::filters::FilterRegistry::get_factory(&filter.name)
let len = config.value.len();

let json_value = match crate::filters::FilterRegistry::get_factory(&filter.name)
.ok_or_else(|| {
crate::filters::CreationError::NotFound(filter.name.clone())
})?
.encode_config_to_json(config)?;
.encode_config_to_json(config)
{
Ok(jv) => jv,
Err(err) => {
tracing::error!("wtf {} {len} {err:#}", filter.name);
return Err(err.into());
}
};

Some(serde_json::to_string(&json_value)?)
} else {
Expand Down

0 comments on commit 00b9849

Please sign in to comment.