Stuck on "get" error #398
Replies: 2 comments 1 reply
-
I don't know why the network tab would show you something different. I would recommend enabling "Preserve log" just so you can check that there's nothing super weird happening like a failing response and then a page refresh, followed by a successful request. I know that still wouldn't exactly match what you are describing, but it's worth trying anyway. Your error message is coming from the following line in Ky: Line 42 in c315cc3 If you're up for it, you could add a debugger breakpoint immediately before that line so that you can explore what the current state of the request, response, and the Ky instance is at the time that it fails. Or you could fork Ky and add some console logs around there. I'd also be happy to take a deeper look myself if you can provide a reproducible example. |
Beta Was this translation helpful? Give feedback.
-
Encountered the same problem today. Found the answer here. Basically this is a CORS issue, unrelated to ky itself. But maybe ky should provide a hint in the form of a better error message. Maybe something along the lines of |
Beta Was this translation helpful? Give feedback.
-
Hi all,
Can you guys help me , please ???
I have a React app and am using KY to fetch data from a Mulesoft integration.
My fetcher:
My fetch method:
I also tried with json()
But the error is the same.
In the "network" tab of the browser, the request was 200 and I can see the response body.
However, console.log on "then" is never executed.
And the catch method is always triggered.
PS: Sorry for my bad english :-(
TIA
Rafael
Beta Was this translation helpful? Give feedback.
All reactions