Next.js Discord

Discord Forum

Data fetching Issue through api route

Unanswered
Japanese flying squid posted this in #help-forum
Open in Discord
Japanese flying squidOP
So I am trying to fetch data of mobile (car page). I am trying to get the data through an API route of myself. If I host it on vercel i get status code 500. Why?

3 Replies

Japanese flying squidOP
It works locally only. When hosting on vercel the fetch doesnt work correctly. Thats why it says can't parse JSON
I tried to fetch the data through client fetch but then I got the "Blocked by CORS" error.