Fixed the json parse error and also made the errors unique