Next.js Discord

Discord Forum

Get fetch with query param to Next api route stuck in pending?

Unanswered
West African Crocodile posted this in #help-forum
Open in Discord
Original message was deleted.

7 Replies

Toyger
pending means it wait response from your handler. you either have something that taking too long time to respond(which on vercel should drop request with timeout error), either you just not returning any response on GET request
Original message was deleted
Toyger
can you show code of your handler? because for now it looks like you just don't have GET handler
There may be another way that doesnt use the fetch function
you could try using server actions instead
im not sure why the searchparams doesnt work. maybe you can send a minimal reproduction repository?
yeah i know, thats what i meant
Toyger
did you try basic returns in GET like immidiately return text and check will it work?
also to comment only cookies part?
are you hosted on vercel?

also try to use Response instead NextResponse