Skip to content

Fix API route exception: Remove intentional test error from /api/submit - #4

Open
sameelarif wants to merge 1 commit into
mainfrom
openhands-workspace-86dj9k7p
Open

Fix API route exception: Remove intentional test error from /api/submit#4
sameelarif wants to merge 1 commit into
mainfrom
openhands-workspace-86dj9k7p

Conversation

@sameelarif

Copy link
Copy Markdown
Owner

Problem

The /api/submit endpoint was throwing an intentional test exception causing 500 errors:

Error: Intentional API route error - this is a test exception

Solution

  • Removed the intentional test exception from the POST handler
  • The API route now properly processes form submissions and returns success responses
  • Added server.log to .gitignore to prevent log files from being committed

Testing

✅ Tested the API endpoint with valid data - returns 200 with success response
✅ Tested the API endpoint with invalid data - returns 400 with proper validation error
✅ Confirmed the form submission processing logic works as expected

Changes

  • src/app/api/submit/route.ts: Removed the intentional exception throw
  • .gitignore: Added server.log to prevent log files from being committed

The API route now functions correctly and processes form submissions without throwing exceptions.

@sameelarif can click here to continue refining the PR

- 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 <openhands@all-hands.dev>
@vercel

vercel Bot commented Oct 4, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
dispatch Error Error Oct 4, 2025 8:10pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants