UNEXPECTED END OF JSON
Hi, Whenever I make API calls through my next js server hosted on cloudflare pages, I am constantly receiving the error
Unexpected end of JSON input
when reading await response.json().
I dont know if my servers are being overwhelemed, the api request always works because im testing it on postman. There is something going on, when sending requests from the api. For more info, the request is being sent to my external heroku server.
any ideas?6 Replies
What do you see if you do
response.text()
?it's empty, but it's wierd because when i spam the same request from postman it always works
Do you have the same headers?
yeah
Can you share the project?
i'm going to try one more fix, and see how it goes for a day. just wanted to bring up this issue to see if this was a common theme amongst a lot of users
thank you for help will keep you updated
one of my devs created a fetch wrapper so prob an issue lying in there
do you know what could be triggering this issue?
i have cache: 'no-store' on all my requests
the request is being called in a 'use server' file btw
@Hard@Work | R2