Skip to content

Commit df2fce3

Browse files
committed
Avoid looping indefinitely when sub-router doesn't match
1 parent d765bbf commit df2fce3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/sdk/src/queries/router.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ macro_rules! try_match_segments {
126126
);
127127
}
128128
)*
129+
130+
return Err(
131+
$crate::queries::router::Error::WrongPath($request.path.clone()))
132+
.into_storage_result();
129133
};
130134

131135
// Terminal tail call, invoked after when all the args in the current

0 commit comments

Comments
 (0)