Add 'no-results' image to make the error page less 'abrupt' for a simple no-results.
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user