more caching and error handling

This commit is contained in:
jake committed 2025-03-24 11:45:48 -04:00
1 parent 8890c1d08d
commit d3250bd00e
18 files changed
+335 -327

No files matched your search

+2 -2
View File
@@ -54,9 +54,9 @@ export const sendMessage = async (
throw new Error(`[contact form] turnstile validation failed: ${turnstileResponse.status}`);
}
const turnstileData = await turnstileResponse?.json();
const turnstileData = (await turnstileResponse.json()) as { success: boolean };
if (!turnstileData?.success) {
if (!turnstileData.success) {
return {
success: false,
message: "Did you complete the CAPTCHA? (If you're human, that is...)",