This is about:
Problem
Undocumented behavior: the router will try to redirect to the not found route when the deserialization fails:
#[derive(Clone, Routable, PartialEq)]
enum Route {
#[at("/news/:id")]
News{id: u8},
#[not_found]
#[at("/404")]
NotFound,
}
News accepts an u8, but when the id goes over 255, the router redirects to the not found route.

The behavior is vaguely mentioned here
|
/// When a route can't be matched, it looks for the route with `not_found` attribute. |
If this is intended behavior, It needs to be documented.
The comment might also need to be more specific:
- When a route can't be matched, it looks for the route with `not_found` attribute.
+ When a route can't be matched, including when the path is matched but the deserialization fails, it looks for the route with `not_found` attribute.
This is about:
Problem
Undocumented behavior: the router will try to redirect to the not found route when the deserialization fails:
News accepts an
u8, but when the id goes over 255, the router redirects to the not found route.The behavior is vaguely mentioned here
yew/packages/yew-router/src/switch.rs
Line 59 in 47fad81
If this is intended behavior, It needs to be documented.
The comment might also need to be more specific: