Commit bcdd069b authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Make the JSON request handler better able to handle malformed responses"

parents 3d55897c 01467168
......@@ -249,7 +249,17 @@ function sendjsonrequest(script, data, rtype, successcallback, errorcallback, qu
d.addCallbacks(function (result) { = '';
var data = evalJSONRequest(result);
var data;
try {
data = jQuery.parseJSON(result.responseText);
catch (e) {
logError('sendjsonrequest() received invalid JSON');
var errtype = false;
if (!data.error) {
errtype = 'ok';
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment