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 console.warn(xhr.responseText) and you will most likely see the HTML that is being received.
Related Posts:
- Parse JSON in JavaScript? [duplicate]
- What is the difference between React Native and React?
- “SyntaxError: Unexpected token < in JSON at position 0"
- Uncaught TypeError: Cannot read property ‘props’ of null
- React Js: Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0
- react router v^4.0.0 Uncaught TypeError: Cannot read property ‘location’ of undefined
- How do you use the ? : (conditional) operator in JavaScript?
- Generate unique random numbers between 1 and 100
- How to append something to an array?
- How to format a JavaScript date
- Sorting an array of objects by property values
- What is the JavaScript version of sleep()?
- How to re-enable right click so that I can inspect HTML elements in Chrome?
- enabling right click:
- Random gradient background color
- No ‘Access-Control-Allow-Origin’ header is present on the requested resource—when trying to get data from a REST API
- JavaScript Array splice vs slice
- How does Access-Control-Allow-Origin header work?
- How to replace all occurrences of a string in JavaScript
- Define a global variable in a JavaScript function
- Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input’
- Cross-Origin Read Blocking (CORB)
- Loop through an array in JavaScript
- Invariant Violation: Objects are not valid as a React child
- Invariant Violation: Objects are not valid as a React child
- What is Virtual DOM?
- SyntaxError: Unexpected token o in JSON at position 1
- How to use Redirect in the new react-router-dom of Reactjs
- SyntaxError: Unexpected token o in JSON at position 1
- What is JSONP, and why was it created?
- TypeError: Converting circular structure to JSON in nodejs
- React.js: Set innerHTML vs dangerouslySetInnerHTML
- React – uncaught TypeError: Cannot read property ‘setState’ of undefined
- Understanding unique keys for array children in React.js
- How to do a redirect to another route with react-router?
- Jest spy on functionality
- Use a JSON array with objects with javascript
- Difference between npx and npm?
- Array of JSON Objects
- Chrome sendrequest error: TypeError: Converting circular structure to JSON
- Fetch: POST JSON data
- Uncaught SyntaxError: Unexpected token u in JSON at position 0
- Reactjs – Form input validation
- TypeScript React.FC
confusion - Unexpected token u in JSON at position 0 (but only sometimes)
- Error Running React Native App From Terminal (iOS)
- How to read an external local JSON file in JavaScript?
- SyntaxError: Unexpected token o in JSON at position 1
- SyntaxError: Unexpected token o in JSON at position 1
- Axios Delete request with body and headers?
- Loop inside React JSX
- pretty-print JSON using JavaScript
- pretty-print JSON using JavaScript
- Can’t resolve module (not found) in React.js
- How to read an external local JSON file in JavaScript?
- How to implement navbar using react
- Loop inside React JSX
- What is the convention in JSON for empty vs. null?
- Understanding React-Redux and mapStateToProps()
- How can I refresh a page with jQuery?
- how to render a react component using ReactDOM Render
- React this.setState is not a function
- Console logging for react?
- Parse Error: Adjacent JSX elements must be wrapped in an enclosing tag
- What is the “right” JSON date format?
- ‘react-scripts’ is not recognized as an internal or external command
- After $npm install, Getting Error: Cannot find module ‘../lib/utils/unsupported.js’
- Nested JSON objects – do I have to use arrays for everything?
- Uncaught TypeError: Cannot read property ‘length’ of undefined
- React Native: this.setState is not a function
- React: trigger onChange if input value is changing by state?
- In reactJS, how to copy text to clipboard?
- SyntaxError: Adjacent JSX elements must be wrapped in an enclosing tag
- What is the “right” JSON date format?
- You should not use Route or withRouter() outside a Router when using react-router 4 and styled-component in react
- React-Router only one child
- Remove properties from objects (JavaScript)
- What does the className attribute mean in JSX?
- What is prevState in ReactJS? [duplicate]
- React with ES7: Uncaught TypeError: Cannot read property ‘state’ of undefined
- React Hook Warnings for async function in useEffect: useEffect function must return a cleanup function or nothing
- Setting a backgroundImage With React Inline Styles
- React – TypeError: Cannot read property ‘props’ of undefined
- How to compare arrays in JavaScript?
- Failed to load resource: net::ERR_FILE_NOT_FOUND loading json.js
- What is the difference between state and props in React?
- How to pass props to {this.props.children}
- React eslint error missing in props validation
- jQuery AJAX cross domain
- OnChange event using React JS for drop down
- ESLint Parsing error: Unexpected token
- React Context vs React Redux, when should I use each one?
- SyntaxError: Unexpected token o in JSON at position 1
- Setting onSubmit in React.js
- How to import image (.svg, .png ) in a React Component
- ReactJS: setTimeout() not working?
- React Uncaught Error: Target container is not a DOM element [duplicate]
- How to refresh a Page using react-route Link
- React Error: Target Container is not a DOM Element
- Loading local JSON file