1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-18 15:05:32 -04:00

more caching and error handling

This commit is contained in:
2025-03-24 11:45:48 -04:00
parent 8890c1d08d
commit d3250bd00e
18 changed files with 335 additions and 327 deletions

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...)",