diff --git a/src/app/error.tsx b/src/app/error.tsx
index bd08cc93..fb9d7471 100644
--- a/src/app/error.tsx
+++ b/src/app/error.tsx
@@ -1,12 +1,15 @@
"use client";
+import * as Sentry from "@sentry/nextjs";
+import { Home, RefreshCw } from "lucide-react";
import Link from "next/link";
+import { useTranslations } from "next-intl";
import { useEffect } from "react";
+import { ErrorScreen } from "@/components/error-screen";
/**
* Route-segment error boundary. Renders inside the root layout (so the shell
- * stays), shows a friendly card, and offers a reset. The raw error is logged to
- * the console, never shown to the user.
+ * stays). Never shows the raw error to the user.
*/
export default function ErrorPage({
error,
@@ -15,51 +18,38 @@ export default function ErrorPage({
error: Error & { digest?: string };
reset: () => void;
}) {
+ const t = useTranslations("pages.error");
+
useEffect(() => {
console.error(error);
+ Sentry.captureException(error);
}, [error]);
return (
-
-
-
-
- ⚠️
-
-
-
Something went wrong
-
- An unexpected error occurred
-
-
-
-
-
- Try again — if the problem persists, please contact a member of
- staff.
+
+
+
+
+ {t("backHome")}
+
+ >
+ }
+ footer={
+ error.digest ? (
+
+ {t("reference", { digest: error.digest })}
-
-
-
- Back home
-
-
- {error.digest ? (
-
- Reference: {error.digest}
-
- ) : null}
-
-
-
+ ) : null
+ }
+ />
);
}
diff --git a/src/app/global-error.tsx b/src/app/global-error.tsx
index df3547a5..4f941e59 100644
--- a/src/app/global-error.tsx
+++ b/src/app/global-error.tsx
@@ -6,7 +6,7 @@ import { useEffect } from "react";
/**
* Last-resort boundary for errors thrown in the root layout itself. It replaces
* the whole document, so it must render its own /
and can't rely on
- * the app shell or its CSS variables.
+ * the app shell or CSS variables from globals.css.
*/
export default function GlobalError({
error,
@@ -27,35 +27,91 @@ export default function GlobalError({
minHeight: "100vh",
display: "grid",
placeItems: "center",
- fontFamily: "Nunito, system-ui, sans-serif",
- background: "#0f1117",
- color: "#e5e7eb",
+ padding: "1.5rem",
+ fontFamily:
+ 'Nunito, ui-rounded, "Segoe UI", system-ui, sans-serif',
+ background:
+ "radial-gradient(ellipse 80% 60% at 50% -10%, rgba(238, 180, 37, 0.22), transparent 55%), linear-gradient(165deg, #141821 0%, #0c0e14 45%, #10141c 100%)",
+ color: "#f3f4f6",
}}
>
-
-
⚠️
-
- Something went wrong
-
-
- The hotel ran into an unexpected error. Please try again.
+
+
+
Error
+
Something went wrong
+
+ The hotel ran into an unexpected error. Please try again — if it
+ keeps happening, contact staff.
: null}
+
+
+ );
+}
diff --git a/src/messages/en.json b/src/messages/en.json
index 33c5eea8..a4e1ab6d 100644
--- a/src/messages/en.json
+++ b/src/messages/en.json
@@ -40,6 +40,23 @@
"darkMode": "Dark mode"
},
"pages": {
+ "error": {
+ "code": "Error",
+ "title": "Something went wrong",
+ "subtitle": "The hotel hit an unexpected snag.",
+ "body": "Try again in a moment. If it keeps happening, contact staff with the reference below.",
+ "tryAgain": "Try again",
+ "backHome": "Back home",
+ "reference": "Reference: {digest}"
+ },
+ "notFound": {
+ "code": "404",
+ "title": "Page not found",
+ "subtitle": "This room doesn’t exist — or the furniture was moved.",
+ "body": "Check the link, or head back to the lobby.",
+ "backHome": "Back home",
+ "latestNews": "Latest news"
+ },
"staff": {
"title": "Staff",
"subtitle": "The team behind the hotel",
diff --git a/src/messages/it.json b/src/messages/it.json
index fe0829a5..49bfe931 100644
--- a/src/messages/it.json
+++ b/src/messages/it.json
@@ -40,6 +40,23 @@
"darkMode": "Tema scuro"
},
"pages": {
+ "error": {
+ "code": "Errore",
+ "title": "Qualcosa è andato storto",
+ "subtitle": "L'hotel ha incontrato un imprevisto.",
+ "body": "Riprova tra poco. Se continua, contatta lo staff indicando il riferimento qui sotto.",
+ "tryAgain": "Riprova",
+ "backHome": "Torna alla home",
+ "reference": "Riferimento: {digest}"
+ },
+ "notFound": {
+ "code": "404",
+ "title": "Pagina non trovata",
+ "subtitle": "Questa stanza non esiste — o i mobili sono stati spostati.",
+ "body": "Controlla il link, oppure torna alla lobby.",
+ "backHome": "Torna alla home",
+ "latestNews": "Ultime notizie"
+ },
"staff": {
"title": "Staff",
"subtitle": "Il team dietro l'hotel",
diff --git a/src/messages/nl.json b/src/messages/nl.json
index 10da2247..cf911bd4 100644
--- a/src/messages/nl.json
+++ b/src/messages/nl.json
@@ -40,6 +40,23 @@
"darkMode": "Donkere modus"
},
"pages": {
+ "error": {
+ "code": "Fout",
+ "title": "Er ging iets mis",
+ "subtitle": "Het hotel liep tegen een onverwachte snag aan.",
+ "body": "Probeer het zo opnieuw. Blijft het probleem? Neem contact op met de staff en noem de referentie hieronder.",
+ "tryAgain": "Opnieuw proberen",
+ "backHome": "Terug naar home",
+ "reference": "Referentie: {digest}"
+ },
+ "notFound": {
+ "code": "404",
+ "title": "Pagina niet gevonden",
+ "subtitle": "Deze kamer bestaat niet — of de meubels zijn verplaatst.",
+ "body": "Controleer de link, of ga terug naar de lobby.",
+ "backHome": "Terug naar home",
+ "latestNews": "Laatste nieuws"
+ },
"staff": {
"title": "Team",
"subtitle": "Het team achter het hotel",