Skip to content

Commit

Permalink
Better error if chained component doesn't exist
Browse files Browse the repository at this point in the history
Signed-off-by: itowlson <[email protected]>
  • Loading branch information
itowlson committed Feb 29, 2024
1 parent e8aad87 commit 859021d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/trigger-http/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,11 @@ impl HttpRuntimeData {
"Internal error: internal request chaining not prepared (handler not assigned)",
))?;

if engine.app().get_component(&component_id).is_none() {
// Give a better error than `execute` will
anyhow::bail!("The application does not contain a component named '{component_id}'");
}

let base = "/";
let raw_route = request.request.uri().path().to_owned();

Expand Down

0 comments on commit 859021d

Please sign in to comment.