diff --git a/lib/commands/quota.js b/lib/commands/quota.js index 72d04cc68..9e1c631d9 100644 --- a/lib/commands/quota.js +++ b/lib/commands/quota.js @@ -35,12 +35,8 @@ Quota.applyCustomLimits = function (Env) { }; Quota.updateCachedLimits = function (Env, cb) { - if (Env.adminEmail === false) { - Quota.applyCustomLimits(Env); - if (Env.allowSubscriptions === false) { return; } - if (Env.blockDailyCheck === true) { return; } - throw new Error("allowSubscriptions must be false if adminEmail is false"); - } + Quota.applyCustomLimits(Env); + if (Env.allowSubscriptions === false || Env.blockDailyCheck === true) { return void cb(); } var body = JSON.stringify({ domain: Env.myDomain, @@ -82,8 +78,8 @@ Quota.updateCachedLimits = function (Env, cb) { req.on('error', function (e) { Quota.applyCustomLimits(Env); - // FIXME this is always falsey. Maybe we just suppress errors? - if (!Env.domain) { return cb(); } + if (!Env.myDomain) { return cb(); } + // only return an error if your server allows subscriptions cb(e); });