Skip to content

Comments

fix: remove error details from 500 responses in submissions API#21

Draft
Copilot wants to merge 2 commits intofeat/personal-sitefrom
copilot/sub-pr-13-841eb06f-feb5-476c-9483-d17aa6944b18
Draft

fix: remove error details from 500 responses in submissions API#21
Copilot wants to merge 2 commits intofeat/personal-sitefrom
copilot/sub-pr-13-841eb06f-feb5-476c-9483-d17aa6944b18

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

The submissions API was returning error.message in 500 responses, potentially leaking database connection strings, schema details, or internal implementation specifics to clients.

Changes:

  • Removed details field from error responses in api/submissions.ts
  • Error handling now matches pattern in other API endpoints (apps, preferences, users)
  • Detailed errors remain in server logs via console.error()

Before:

return new Response(
  JSON.stringify({
    error: 'Internal server error',
    details: error instanceof Error ? error.message : 'Unknown error'
  }),
  { status: 500, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
);

After:

return new Response(
  JSON.stringify({ error: 'Internal server error' }),
  { status: 500, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
);

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI mentioned this pull request Feb 12, 2026
@vercel
Copy link

vercel bot commented Feb 12, 2026

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

Project Deployment Actions Updated (UTC)
string-v2 Ready Ready Preview, Comment Feb 12, 2026 4:08pm

…akage

Co-authored-by: ghostleek <44336310+ghostleek@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP Address feedback on personal site enhancements fix: remove error details from 500 responses in submissions API Feb 12, 2026
Copilot AI requested a review from ghostleek February 12, 2026 16:07
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