diff --git a/src/services/InstanceService/index.ts b/src/services/InstanceService/index.ts index 88c9127a..0b94fe8a 100644 --- a/src/services/InstanceService/index.ts +++ b/src/services/InstanceService/index.ts @@ -410,6 +410,11 @@ export const instanceService = mkSingleton( }) if (instance) { dbg(`${host} is a cname`) + if (!instance.cname_active) { + throw new Error( + `CNAME not active for this instance. See dashboard.`, + ) + } return instance } } diff --git a/src/services/MothershipAdmimClientService/InstanceMIxin.ts b/src/services/MothershipAdmimClientService/InstanceMIxin.ts index a7035aac..b2b66aa7 100644 --- a/src/services/MothershipAdmimClientService/InstanceMIxin.ts +++ b/src/services/MothershipAdmimClientService/InstanceMIxin.ts @@ -36,7 +36,7 @@ export const createInstanceMixin = (context: MixinContext) => { ): Promise => client .collection(INSTANCE_COLLECTION) - .getFirstListItem(`cname = '${host}' and cname_active = 1`, { + .getFirstListItem(`cname = '${host}'`, { expand: 'uid', })