From d4a4e40ddad8b3e390addcde4662641c278ee3a0 Mon Sep 17 00:00:00 2001 From: openhands Date: Sat, 4 Oct 2025 20:10:41 +0000 Subject: [PATCH] Fix API submit route by removing intentional test exception - Removed the intentional 'throw new Error()' statement that was causing 500 errors - API now properly processes form submissions and returns appropriate status codes - Added server.log to .gitignore to prevent accidental commits Co-authored-by: openhands --- .gitignore | 1 + src/app/api/submit/route.ts | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5ef6a52..1c7b92d 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ npm-debug.log* yarn-debug.log* yarn-error.log* .pnpm-debug.log* +server.log # env files (can opt-in for committing if needed) .env* diff --git a/src/app/api/submit/route.ts b/src/app/api/submit/route.ts index f01639a..5064f1e 100644 --- a/src/app/api/submit/route.ts +++ b/src/app/api/submit/route.ts @@ -4,9 +4,6 @@ export async function POST(request: NextRequest) { try { const body = await request.json(); - // Throw an intentional exception - throw new Error("Intentional API route error - this is a test exception"); - // Log the form data console.log("Form submission received:", { timestamp: new Date().toISOString(),