Fix non-serializable accessFilter in admin load, add error boundary and tests

This commit is contained in:
NeilClack
2026-07-17 14:52:09 -05:00
parent dd8c194de2
commit b746d89448
5 changed files with 159 additions and 4 deletions
@@ -0,0 +1,25 @@
<script lang="ts">
import { page } from '$app/stores';
import Window from '$lib/components/containers/Window.svelte';
</script>
<Window>
<div class="flex flex-col items-center gap-4 p-6 text-center">
<h1 class="text-xl font-bold text-gray-900 dark:text-gray-100">
Admin Error ({$page.status})
</h1>
<p class="max-w-md text-sm text-gray-600 dark:text-gray-400">
{#if $page.error?.message}
{$page.error.message}
{:else}
An unexpected error occurred while loading this admin page.
{/if}
</p>
<a
href="/admin"
class="mt-2 border border-gray-200 px-4 py-2 text-sm font-medium text-gray-900 hover:bg-gray-50 dark:border-gray-700 dark:text-gray-100 dark:hover:bg-gray-800"
>
Back to Admin
</a>
</div>
</Window>