-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* add custom rendering for exceptions * add symfony response status codes * move error codes into array
- Loading branch information
1 parent
5a3f5eb
commit 4cad7db
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<script setup lang="ts"> | ||
import GuestLayout from '@/Layouts/GuestLayout.vue' | ||
import { Head } from '@inertiajs/vue3' | ||
import { computed } from 'vue' | ||
const props = defineProps<{ | ||
status: number | ||
}>() | ||
const title = computed(() => { | ||
return { | ||
503: '503: Service Unaviable', | ||
500: '500: Server Error', | ||
404: '404: Page Not Found', | ||
403: '403: Forbidden', | ||
}[props.status] | ||
}) | ||
const description = computed(() => { | ||
return { | ||
503: 'Sorry, we are doing some maintenance. Please check back soon.', | ||
500: 'Whoops, something went wrong on our servers.', | ||
404: 'Sorry, the page you are looking for could not be found.', | ||
403: 'Sorry, you are forbidden from accessing this page.', | ||
}[props.status] | ||
}) | ||
</script> | ||
|
||
<template> | ||
<Head title="Error" /> | ||
<div class="flex flex-col justify-between h-full items-center"> | ||
<h2 class="text-2xl text-center"> {{ title }}</h2> | ||
<p class="text-center my-auto">{{ description }}</p> | ||
<a class="bg-blue-800 rounded-md block text-center text-white w-5/6 py-3 hover:bg-blue-700" href="/">Back</a> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
export default { | ||
layout: GuestLayout, | ||
} | ||
</script> |