Return a 404 when paring the route fails (#3860)
* return a 404 when paring the route fails * add a playwright test for fullstack routing status codes * Fix new playwright test * document SSRError * Make SSRError public and fix clippy * Move the error display bound to the routable trait * fix clippy * return a more generic 404 message * fix router tests
This commit is contained in:
1 parent
7b7357037f
commit
09a4b5eb4e
18 files changed
+253
-46
No files matched your search
@@ -1,7 +1,5 @@
|
||||
use dioxus_lib::prelude::*;
|
||||
|
||||
use std::str::FromStr;
|
||||
|
||||
use crate::{
|
||||
prelude::{provide_router_context, Outlet},
|
||||
routable::Routable,
|
||||
@@ -39,10 +37,7 @@ impl<R: Clone> PartialEq for RouterProps<R> {
|
||||
}
|
||||
|
||||
/// A component that renders the current route.
|
||||
pub fn Router<R: Routable + Clone>(props: RouterProps<R>) -> Element
|
||||
where
|
||||
<R as FromStr>::Err: std::fmt::Display,
|
||||
{
|
||||
pub fn Router<R: Routable + Clone>(props: RouterProps<R>) -> Element {
|
||||
use crate::prelude::{outlet::OutletContext, RouterContext};
|
||||
|
||||
use_hook(|| {
|
||||
|
||||
Reference in new issue
Block a user