diff --git a/messages/de.json b/messages/de.json index ce28bb09c..745402814 100644 --- a/messages/de.json +++ b/messages/de.json @@ -6358,6 +6358,11 @@ "label": "Passphrase", "error": "Diese Passphrase ist nicht korrekt.", "submit": "Entsperren" + }, + "loadError": { + "title": "Diese geteilte Ansicht konnte nicht geladen werden", + "description": "Beim Öffnen dieser geteilten Gesundheitsdaten ist ein Fehler aufgetreten. Der Link ist möglicherweise abgelaufen, oder es lag ein vorübergehendes Problem vor. Versuche es erneut oder bitte die Person, die den Link geteilt hat, um einen neuen.", + "retry": "Erneut versuchen" } }, "cycle": { diff --git a/messages/en.json b/messages/en.json index 14fa8b085..2123b06ff 100644 --- a/messages/en.json +++ b/messages/en.json @@ -6358,6 +6358,11 @@ "label": "Passphrase", "error": "That passphrase is not correct.", "submit": "Unlock" + }, + "loadError": { + "title": "This shared view could not be loaded", + "description": "Something went wrong while opening this shared health record. The link may have expired, or there was a temporary problem. Try again, or ask the person who shared it for a new link.", + "retry": "Try again" } }, "cycle": { diff --git a/messages/es.json b/messages/es.json index ce2ee6de9..9c486bcb6 100644 --- a/messages/es.json +++ b/messages/es.json @@ -6358,6 +6358,11 @@ "label": "Frase de acceso", "error": "Esa frase de acceso no es correcta.", "submit": "Desbloquear" + }, + "loadError": { + "title": "No se pudo cargar esta vista compartida", + "description": "Se produjo un error al abrir este registro de salud compartido. Puede que el enlace haya caducado o que haya habido un problema temporal. Inténtalo de nuevo o pide un enlace nuevo a la persona que lo compartió.", + "retry": "Intentar de nuevo" } }, "cycle": { diff --git a/messages/fr.json b/messages/fr.json index 69f085b74..4ac28d1b6 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -6358,6 +6358,11 @@ "label": "Phrase secrète", "error": "Cette phrase secrète est incorrecte.", "submit": "Déverrouiller" + }, + "loadError": { + "title": "Impossible de charger cette vue partagée", + "description": "Une erreur s'est produite lors de l'ouverture de ce dossier de santé partagé. Le lien a peut-être expiré, ou un problème temporaire est survenu. Réessayez ou demandez un nouveau lien à la personne qui l'a partagé.", + "retry": "Réessayer" } }, "cycle": { diff --git a/messages/it.json b/messages/it.json index 60e5288d4..abfc66c93 100644 --- a/messages/it.json +++ b/messages/it.json @@ -6358,6 +6358,11 @@ "label": "Passphrase", "error": "La passphrase non è corretta.", "submit": "Sblocca" + }, + "loadError": { + "title": "Impossibile caricare questa vista condivisa", + "description": "Si è verificato un errore durante l'apertura di questo referto sanitario condiviso. Il link potrebbe essere scaduto oppure si è verificato un problema temporaneo. Riprova o chiedi un nuovo link alla persona che lo ha condiviso.", + "retry": "Riprova" } }, "cycle": { diff --git a/messages/pl.json b/messages/pl.json index 5631b6f90..9a72becb6 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -6358,6 +6358,11 @@ "label": "Hasło", "error": "To hasło jest nieprawidłowe.", "submit": "Odblokuj" + }, + "loadError": { + "title": "Nie udało się załadować udostępnionego widoku", + "description": "Podczas otwierania udostępnionej dokumentacji zdrowotnej wystąpił błąd. Link mógł wygasnąć lub wystąpił chwilowy problem. Spróbuj ponownie albo poproś osobę, która go udostępniła, o nowy link.", + "retry": "Spróbuj ponownie" } }, "cycle": { diff --git a/src/app/c/error.tsx b/src/app/c/error.tsx new file mode 100644 index 000000000..27700b74f --- /dev/null +++ b/src/app/c/error.tsx @@ -0,0 +1,41 @@ +"use client"; + +/** + * Error boundary for the public clinician share route (`/c/`). + * + * The share view carries no app chrome and no session, so a render failure must + * not fall through to the full-app error screen. This renders a clean, locale- + * aware, stack-free message and offers a single retry. No record data, no + * digest, no stack — a probe learns nothing from a failed render. + */ +import { useTranslations } from "@/lib/i18n/context"; +import { Button } from "@/components/ui/button"; + +export default function ClinicianShareError({ + reset, +}: { + error: Error & { digest?: string }; + reset: () => void; +}) { + const { t } = useTranslations(); + + return ( +
+
+

+ {t("clinicianView.loadError.title")} +

+

+ {t("clinicianView.loadError.description")} +

+ +
+
+ ); +}