Skip to content

Debug prod api quick ask 500 error#5

Draft
tomsmith8 wants to merge 1 commit into
masterfrom
cursor/debug-prod-api-quick-ask-500-error-fe80
Draft

Debug prod api quick ask 500 error#5
tomsmith8 wants to merge 1 commit into
masterfrom
cursor/debug-prod-api-quick-ask-500-error-fe80

Conversation

@tomsmith8
Copy link
Copy Markdown
Owner

Add export const runtime = "nodejs" to several API routes to resolve 500 errors in production.

After a recent middleware removal, several API routes that utilize Node.js-specific features like getServerSession() (NextAuth), EncryptionService (Node.js crypto), and Prisma database operations defaulted to the Edge Runtime in production. This incompatibility caused 500 errors. Explicitly setting runtime = "nodejs" ensures these routes execute in the correct environment.


Open in Cursor Open in Web

Co-authored-by: tom.a.smith96 <tom.a.smith96@gmail.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented Oct 10, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

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