Surface contact email error details

This commit is contained in:
Calum Muir 2025-12-22 13:16:10 +00:00
parent c3cc8cfb1c
commit 5fc57a36c9

View file

@ -67,7 +67,10 @@ export const Contact = (): JSX.Element => {
details?: string; details?: string;
} | null; } | null;
if (errorData?.error) { if (errorData?.error) {
throw new Error(errorData.error); const detail = errorData.details
? ` (${errorData.details})`
: "";
throw new Error(`${errorData.error}${detail}`);
} }
const errorText = await response.text().catch(() => ""); const errorText = await response.text().catch(() => "");
const message = errorText.trim() const message = errorText.trim()