From b5700dc4d47be4422c84081c9396371eb24c8a49 Mon Sep 17 00:00:00 2001 From: openhands Date: Sat, 4 Oct 2025 20:10:13 +0000 Subject: [PATCH] Fix API route exception: Remove intentional test error from /api/submit - Removed the intentional test exception that was causing 500 errors - API route now properly processes form submissions and returns success responses - Added server.log to .gitignore to prevent log files from being committed Co-authored-by: openhands --- .gitignore | 3 +++ src/app/api/submit/route.ts | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5ef6a52..b55b39c 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,6 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +# logs +server.log 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(),