Replies: 1 comment
-
This error occurs when the response body is empty. Not sure about your app's specifics but for some reason the data in your res.status(200).json(data) is empty when you attempt to send it. That's why it works when you have it stored. Look into what you are trying to send when you reload the page, even with a simple console.log() and verify it's empty. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This wasted my time figuring out what's the problem in my API. My code was like this:
I'm trying return a response with an object(which is an array element) from the filtered array. When I dynamically route to the page that uses this API, it doesn't have a problem, but when I reload the page or dynamically enter the URL of the page that uses this api, it shows the
"TypError : Argument entity is required"
What's intruiging for me is that when I use spread operator on the
filtered[0]
array element and store it in a a variable and pass it into the response call, it worksI don't know if its a false report or its really a problem in the entity on my fetch call,
Beta Was this translation helpful? Give feedback.
All reactions