diff --git a/lib/http-commands.js b/lib/http-commands.js index 229c27e8b..7d8a65182 100644 --- a/lib/http-commands.js +++ b/lib/http-commands.js @@ -287,6 +287,7 @@ var handleResponse = function (Env, req, res) { }); return res.status(500).json({ error: 'Execution error', + errorCode: Util.serializeError(err) }); } res.status(200).json(content); diff --git a/www/checkup/main.js b/www/checkup/main.js index b3ea8204a..3a027ffc6 100644 --- a/www/checkup/main.js +++ b/www/checkup/main.js @@ -359,12 +359,12 @@ define([ Block.writeLoginBlock({ blockKeys: blockKeys, content: {} - }, waitFor(function (e) { + }, waitFor(function (e, obj) { // we should tolerate restricted registration // and proceed to clean up after any data we've created - if (e === 'E_RESTRICTED') { + if (e && obj && obj.errorCode === 'E_RESTRICTED') { restricted = true; - return void cb(true); + return; } if (e) { waitFor.abort(); diff --git a/www/common/outer/http-command.js b/www/common/outer/http-command.js index 8e779bbf9..2f74460a7 100644 --- a/www/common/outer/http-command.js +++ b/www/common/outer/http-command.js @@ -88,7 +88,7 @@ define([ console.error(err); // there might be more info here if (data) { console.error(data); } - return void cb("RESPONSE_REJECTED"); + return void cb("RESPONSE_REJECTED", data); } cb(void 0, data); }));