Call Now
Quick Inquiry

SyntaxError: Unexpected token < in JSON at position 0

SyntaxError: Unexpected token < in JSON at position 0

The wording of the error message corresponds to what you get from Google Chrome when you run JSON.parse('<...'). I know you said the server is setting Content-Type: application/JSON, but I am led to believe the response body is actually HTML.

Feed.js:94 undefined "parsererror" "SyntaxError: Unexpected token < in JSON at position 0"

with the line console.error(this.props.url, status, err.toString()) underlined.

The err was actually thrown within jQuery and passed to you as a variable err. The reason that line is underlined is simply because that is where you are logging it.

I would suggest that you add to your logging. Looking at the actual XHR (XMLHttpRequest) properties to learn more about the response. Try adding a console. warn(xhr.responseText) and you will most likely see the HTML that is being received.

126 0

Write a Comments

* Be the first to Make Comment

GoodFirms Badge
GoodFirms Badge

Fix Your Meeting With Our SEO Consultants in India To Grow Your Business Online