Use BAD_STATE consistently for demo mode
This commit is contained in:
+1
-1
@@ -205,7 +205,7 @@ async function setConfig(domain, data, auditSource) {
|
||||
let { zoneName, provider, config, fallbackCertificate, tlsConfig } = data;
|
||||
|
||||
const { domain:dashboardDomain } = await dashboard.getLocation();
|
||||
if (constants.DEMO && (domain === dashboardDomain)) throw new BoxError(BoxError.CONFLICT, 'Not allowed in demo mode');
|
||||
if (constants.DEMO && (domain === dashboardDomain)) throw new BoxError(BoxError.BAD_STATE, 'Not allowed in demo mode');
|
||||
|
||||
const domainObject = await get(domain);
|
||||
if (zoneName) {
|
||||
|
||||
Reference in New Issue
Block a user