Use new error template

This commit is contained in:
Korbs 2024-11-26 21:22:37 -05:00
parent a08515a395
commit 8753e72c8d
4 changed files with 27 additions and 0 deletions

BIN
bun.lockb

Binary file not shown.

View file

@ -19,6 +19,7 @@
"@iconoir/vue": "^7.10.0", "@iconoir/vue": "^7.10.0",
"@meilisearch/instant-meilisearch": "^0.22.0", "@meilisearch/instant-meilisearch": "^0.22.0",
"@playform/compress": "^0.1.6", "@playform/compress": "^0.1.6",
"@sudovanilla/errors": "^3.0.0",
"@tryghost/content-api": "^1.11.21", "@tryghost/content-api": "^1.11.21",
"astro": "^4.16.14", "astro": "^4.16.14",
"astro-better-image-service": "^2.0.37", "astro-better-image-service": "^2.0.37",

8
src/pages/404.astro Normal file
View file

@ -0,0 +1,8 @@
---
import { Error } from "@sudovanilla/errors";
---
<Error
Title="Error 404"
Message="The page you're looking for is not found."
/>

18
src/pages/500.astro Normal file
View file

@ -0,0 +1,18 @@
---
// Layout
import { Error } from "@sudovanilla/errors";
// Fetch Error Message
interface Props {
error: unknown
}
const { error } = Astro.props
---
<Error
Title="Error"
Message={error instanceof Error ? error.message : 'Something happened, error unknown. Try again later.'}
Error
CheckStatus
/>