From db2c783ba54f861358b9639e5bbfc29c5b140d04 Mon Sep 17 00:00:00 2001 From: openhands Date: Sat, 4 Oct 2025 20:12:04 +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 responses - Added server.log and package-lock.json to .gitignore Co-authored-by: openhands --- .gitignore | 6 ++++++ src/app/api/submit/route.ts | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5ef6a52..b99b0c5 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,9 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +# logs +server.log + +# npm lock file (project uses pnpm) +package-lock.json 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(),