Add 'no-results' image to make the error page less 'abrupt' for a simple no-results.

This commit is contained in:
2026-04-28 17:24:04 +01:00
parent 5ead4f8296
commit 5bbffcecb8
2 changed files with 6 additions and 2 deletions

View File

@@ -2,12 +2,16 @@
import { page } from '$app/state';
import stopErr from '$lib/assets/img/stop-error.svg';
import noResult from '$lib/assets/img/no-data.svg';
import Button from '$lib/components/ui/Button.svelte';
</script>
<div class="error-wrapper">
{#if page.status == 20}
<img class="err-img" src={noResult} alt="" role="presentation" width="200" height="200" />
{:else}
<img class="err-img" src={stopErr} alt="" role="presentation" width="150" height="210" />
{/if}
<h2 class="label">{page.status}</h2>
<p class="error-message">

View File

@@ -41,7 +41,7 @@ export const load: PageLoad = async ({ url }) => {
owlCode: 'API_ERROR',
});
} else if (e instanceof Error) {
throw error(20, {
throw error(500, {
message: e.message,
owlCode: 'GEN_ERROR',
})