Use BAD_STATE consistently for demo mode
This commit is contained in:
+2
-2
@@ -83,7 +83,7 @@ async function startPrepareLocation(domain, auditSource) {
|
||||
|
||||
debug(`prepareLocation: ${domain}`);
|
||||
|
||||
if (constants.DEMO) throw new BoxError(BoxError.CONFLICT, 'Not allowed in demo mode');
|
||||
if (constants.DEMO) throw new BoxError(BoxError.BAD_STATE, 'Not allowed in demo mode');
|
||||
|
||||
const fqdn = dns.fqdn(constants.DASHBOARD_SUBDOMAIN, domain);
|
||||
const result = await apps.list();
|
||||
@@ -118,7 +118,7 @@ async function setupLocation(subdomain, domain, auditSource) {
|
||||
|
||||
debug(`setupLocation: ${domain}`);
|
||||
|
||||
if (constants.DEMO) throw new BoxError(BoxError.CONFLICT, 'Not allowed in demo mode');
|
||||
if (constants.DEMO) throw new BoxError(BoxError.BAD_STATE, 'Not allowed in demo mode');
|
||||
|
||||
await reverseProxy.writeDashboardConfig(domain);
|
||||
await setLocation(subdomain, domain);
|
||||
|
||||
Reference in New Issue
Block a user