diff --git a/source/src/layouts/Error.astro b/source/src/layouts/Error.astro index 7511c25..2851092 100755 --- a/source/src/layouts/Error.astro +++ b/source/src/layouts/Error.astro @@ -1,81 +1,34 @@ --- // Properties -const { Title, Description } = Astro.props - -// Components -import Head from '@components/global/Head.astro' - -// Styles -import '@styles/index.scss' -import '@styles/mobile.scss' - -// Error -interface Props { - error: unknown -} - -const { error } = Astro.props - -// SDK -import { OpenpanelSdk } from '@openpanel/sdk'; -const op = new OpenpanelSdk({ - clientId: 'b4c27f56-18f5-4d66-bb62-cbf7f7161812', - clientSecret: 'sec_107558407af59a591b50', -}); - -// // Track Event -// if (Astro.cookies.get("Telemtry").value === "Enabled") { -// op.event('Error', { Error: error instanceof Error ? error.message : 'Unknown error' }); -// } -// else if (Astro.cookies.get("Telemtry").value === "Disabled") { -// null -// } - -// // Cookies -// if (Astro.cookies.get("Telemtry").value === "Enabled") { -// var UserIsOptedIn = true -// } -// else if (Astro.cookies.get("Telemtry").value === "Disabled") { -// var UserIsOptedIn = false -// } +const { + Title, + Message +} = Astro.props --- -
-
-
-

An error has occured:

-

{error instanceof Error ? error.message : 'Unknown error'}

-
- - + +
+
+

{Title}

+

{Message}

+
- \ No newline at end of file diff --git a/source/src/pages/404.astro b/source/src/pages/404.astro index 762b377..c118219 100755 --- a/source/src/pages/404.astro +++ b/source/src/pages/404.astro @@ -7,8 +7,8 @@ import Base from "@layouts/Default.astro";
-

Error 404

-

Page not found.

+

Error 404: Page Not Found

+

The page you've requested has either been moved or never existed. Double check the URL you're viewing.

diff --git a/source/src/pages/500.astro b/source/src/pages/500.astro index feb975a..2e19713 100755 --- a/source/src/pages/500.astro +++ b/source/src/pages/500.astro @@ -1,4 +1,13 @@ --- -import Error from '@layouts/Error.astro' +import ErrorLayout from '@layouts/Error.astro' + +// Fetch Error Output +// https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors.ts#L5-L11 +interface Props { + error: unknown +} + +const { error } = Astro.props --- - \ No newline at end of file + + \ No newline at end of file