Based on the image, your error response is in XML format and seems it is expected and being parsed as a JSON. Given the mismtach, you get an error while parsing.
Next followup query could be to fix it:
1. Client side, don't blindly assume it as json, take it as text and work out
2. Server side, if it's in your control, return json response instead of a XML. Then on client side you can parse as returned:
header: {'Content-Type: application/json'};
Based on image, you seem to knw how to use browsers web developer tool. Use it and see what is the response there and plan your next steps.