JSON.parse() throws an exception when responseText is not a JSON string. so we should catch it