mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 06:10:44 +08:00
Improve catching of errors when loading routes
- Handle ResponseParseErros, ResponseErrors and normal errors differently. - Show them all in the same `LoadError` view - Add a subtitle to give users some more information on what could have gone wrong. - Add more properties to the copyable error message to make debugging easier.
This commit is contained in:
+3
-3
@@ -24,7 +24,7 @@
|
||||
import Session from "@app/views/session/Index.svelte";
|
||||
import Source from "@app/views/projects/Source.svelte";
|
||||
|
||||
import LoadError from "@app/components/LoadError.svelte";
|
||||
import Error from "@app/views/error/View.svelte";
|
||||
import Loading from "@app/components/Loading.svelte";
|
||||
|
||||
const activeRouteStore = router.activeRouteStore;
|
||||
@@ -87,8 +87,8 @@
|
||||
<Patches {...$activeRouteStore.params} />
|
||||
{:else if $activeRouteStore.resource === "project.patch"}
|
||||
<Patch {...$activeRouteStore.params} />
|
||||
{:else if $activeRouteStore.resource === "loadError"}
|
||||
<LoadError {...$activeRouteStore.params} />
|
||||
{:else if $activeRouteStore.resource === "error"}
|
||||
<Error {...$activeRouteStore.params} />
|
||||
{:else if $activeRouteStore.resource === "notFound"}
|
||||
<NotFound {...$activeRouteStore.params} />
|
||||
{:else}
|
||||
|
||||
Reference in New Issue
Block a user