Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Uncaught Exception in Next.js API Route #73

Open
zouantchaw opened this issue Mar 7, 2023 · 0 comments
Open

Uncaught Exception in Next.js API Route #73

zouantchaw opened this issue Mar 7, 2023 · 0 comments

Comments

@zouantchaw
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant