mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-29 20:43:37 +03:00
add error page
This commit is contained in:
parent
85d8d16e0d
commit
34f868fb95
22
src/routes/+error.svelte
Normal file
22
src/routes/+error.svelte
Normal file
@ -0,0 +1,22 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { log } from '$lib';
|
||||
|
||||
$: if ($page.error) {
|
||||
log.error($page.url, $page.error);
|
||||
} else {
|
||||
log.error($page.url, $page.status);
|
||||
}
|
||||
|
||||
$: message = $page.error
|
||||
? $page.error.message
|
||||
: $page.status === 404
|
||||
? 'Page not found'
|
||||
: 'Something went wrong';
|
||||
</script>
|
||||
|
||||
<div class="flex flex-1 h-full">
|
||||
<h1 class="m-auto text-xl">
|
||||
{message} :(
|
||||
</h1>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user