NextJS api route not working

hey so i have nextjs page using api routes, i created a simple api route that i wanna use as my backend kinda, just call it from another app and it will do some stuff and return back to me just an id... but that's not important, i tested it and it worked flawlessly on my localhost machine, once i deployed it it went thru with no build issues not even warning and when i want to test it it throws me
Function Invocation Internal Sever Error 500
Function Invocation Internal Sever Error 500
why is that? i dont get it
1 Reply
Hamza Ali Turi
If its in vercel where you have deployed then look up the runtime logs, there you will see the cause of the error. It has probably something to do with environment variables.

Did you find this page helpful?