I encountered an uncaught exception in my Next.js API route. The error message I received was:
// 500 Internal Server Error
Uncaught Exception {"errorType":"Error","errorMessage":"Unexpected server response: 400","stack":["Error: Unexpected server response: 400"," at ClientRequest.<anonymous> (/var/task/node_modules/.pnpm/ws@7.4.6/node_modules/ws/lib/websocket.js:604:7)"," at ClientRequest.emit (node:events:513:28)"," at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)"," at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)"," at TLSSocket.socketOnData (node:_http_client:534:22)"," at TLSSocket.emit (node:events:513:28)"," at addChunk (node:internal/streams/readable:315:12)"," at readableAddChunk (node:internal/streams/readable:289:9)"," at TLSSocket.Readable.push (node:internal/streams/readable:228:10)"," at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)"]}
Unknown application error occurred
Runtime.Unknown
I've tried adding additional error handling code to my API route, but I'm still experiencing this issue: route handler
I implemented the same routes in a new nextjs app and it work perfectly:new route handler
I encountered an uncaught exception in my Next.js API route. The error message I received was:
I've tried adding additional error handling code to my API route, but I'm still experiencing this issue: route handler
I implemented the same routes in a new nextjs app and it work perfectly: new route handler