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:
Sebastian Martinez
2024-02-15 13:26:11 -03:00
parent 8450f0cd9c
commit d216caec7d
24 changed files with 389 additions and 185 deletions
+3 -3
View File
@@ -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}