Fix checkup test when registration is restricted #1185

This commit is contained in:
yflory 2023-08-21 16:42:01 +02:00
parent 5807b4dddf
commit 75cd470fb1
3 changed files with 5 additions and 4 deletions

View File

@ -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);

View File

@ -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();

View File

@ -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);
}));