Random bug throwing in the Response Object

Hi Team,

When I try to parse the response from the request-API in the serverless app, I’m getting the following exceptions Randomly.

  • Unexpected token u in JSON at position 0
  • Unexpected token e in JSON at position 0
  • Unexpected end of JSON input
  • Make sure you get a valid response from the request API and try to see the response value in browser by debugging. ( Hope it is not undefined )
  • Try to Stringify the response and then parse it using JSON.parse(JSON.stringify(response))

Hi Divakar

Thanks for the response and help. But I’m facing problem in the Backend , so we don’t have option to debug via Browser. Another thing is, I hope request-api will return the data in the expected format and ie., JSON format. because I put hope on marketplace to render data properly. Again do we need to Stringify and Parse? Because it throws in random fashion