Syntax Error: Unexpected token at JSON.parse. Type: entity.parse.failed

Viewed 23

I'm currently working on my first project which is creating a clone of a website. My clone is based off of Soundcloud (a music website) and I am using React/Redux for the front end, Express.js, Sequelize.js and PostgreSQL for the backend. My goal is to be able to add a song to a playlist using the their ids but I ran into this error(posted below) and cannot figure out where it is coming from. Does anyone know, or have advice as to how to pinpoint a syntax error like this? Is it possible it could be something else? Anything helps.

Error showing up in terminal

1 Answers

Most of time you face this problem when you violate JSON syntax rule, check the JSON you're sending to the server carefully and see if:

  • You did not miss any quotation marks in both the key and value of the JSON
  • You insert comma at the end of each value
Related