部署报错详细提示

This commit is contained in:
eoao
2025-08-28 22:22:00 +08:00
parent 375613c219
commit 6219a1474e
4 changed files with 22 additions and 0 deletions

View File

@@ -21,8 +21,10 @@ const settingService = {
},
async query(c) {
const setting = await c.env.kv.get(KvConst.SETTING, { type: 'json' });
let domainList = c.env.domain;
if (typeof domainList === 'string') {
try {
domainList = JSON.parse(domainList)
@@ -30,6 +32,11 @@ const settingService = {
throw new BizError(t('notJsonDomain'));
}
}
if (!c.env.domain) {
throw new BizError(t('noDomainVariable'));
}
domainList = domainList.map(item => '@' + item);
setting.domainList = domainList;
return setting;