From e7b8921a39aada294417dab32738bd2ee8723b71 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Tue, 17 Oct 2023 18:13:40 -0700 Subject: [PATCH] error page added --- src/routes/+error.svelte | 5 +++++ src/routes/+page.server.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 src/routes/+error.svelte diff --git a/src/routes/+error.svelte b/src/routes/+error.svelte new file mode 100644 index 000000000..7bf6432c8 --- /dev/null +++ b/src/routes/+error.svelte @@ -0,0 +1,5 @@ + + +
{$page.status}: {$page.error.message}
diff --git a/src/routes/+page.server.ts b/src/routes/+page.server.ts index 827666dff..1f7a5a54c 100644 --- a/src/routes/+page.server.ts +++ b/src/routes/+page.server.ts @@ -19,6 +19,6 @@ export const load: PageServerLoad = async ({ url }) => { }); return { - models: models + models: models ? models.models : [] }; };