Skip to content

Commit

Permalink
update error page
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Oct 21, 2023
1 parent acc3b64 commit a557be0
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions packages/site/src/routes/+error.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<script>
import { dev } from '$app/environment';
export let status;
export let error;
import { page } from '$app/stores';
</script>

<style>
Expand All @@ -28,17 +26,13 @@
</style>

<svelte:head>
<title>{status}</title>
<title>{$page.status}</title>
</svelte:head>

<h1>{status}</h1>

{#if error.message}
<p class="error">{status}: {error.message}</p>
{#if $page.error.message}
<p class="error">{status}: {$page.error.message}</p>
{:else}
<p class="error">Encountered a {status} error</p>
{/if}

{#if dev && error.stack}
<pre>{error.stack}</pre>
<p class="error">Encountered a {$page.status} error</p>
{/if}

0 comments on commit a557be0

Please sign in to comment.