Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serverless functions error when deployed to Vercel #116

Open
viperfx opened this issue Apr 18, 2021 · 1 comment
Open

Serverless functions error when deployed to Vercel #116

viperfx opened this issue Apr 18, 2021 · 1 comment

Comments

@viperfx
Copy link

viperfx commented Apr 18, 2021

All api end points give this error

[GET] /api/user
12:04:20:37
2021-04-18T16:04:21.329Z	e23c93be-e00e-48b5-9ee2-1d6d10ef82db	ERROR	Unhandled Promise Rejection 	{"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: 8000","reason":{"errorType":"RangeError","errorMessage":"Invalid status code: 8000","code":"ERR_HTTP_INVALID_STATUS_CODE","stack":["RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: 8000","    at ServerResponse.writeHead (_http_server.js:255:11)","    at ServerResponse._implicitHeader (_http_server.js:246:8)","    at write_ (_http_outgoing.js:685:9)","    at ServerResponse.end (_http_outgoing.js:799:5)","    at onerror (/var/task/node_modules/next-connect/lib/index.js:6:7)","    at next (/var/task/node_modules/next-connect/lib/index.js:69:13)","    at processTicksAndRejections (internal/process/task_queues.js:93:5)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: 8000","    at process.<anonymous> (/var/runtime/index.js:35:15)","    at process.emit (events.js:327:22)","    at processPromiseRejections (internal/process/promises.js:245:33)","    at processTicksAndRejections (internal/process/task_queues.js:94:32)"]}
Unknown application error occurred

I have set all the credentials for my mongodb cluster hosted on MongoDB Atlas

@hoangvvo
Copy link
Owner

This is a possible cause for your issue: https://stackoverflow.com/questions/48097612/connecting-to-mongodb-atlas-com-mongodb-mongocommandexception-command-failed-w. Can you double check your db credential and permissions?

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

No branches or pull requests

2 participants