mirror of
https://github.com/certd/certd.git
synced 2026-04-24 12:27:25 +08:00
fix: 站点检查多个ip连接超时的报错显示不出来的bug
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Autoload, Config, Init, Inject, Scope, ScopeEnum } from '@midwayjs/core';
|
||||
import { logger } from '@certd/basic';
|
||||
import { http, logger } from '@certd/basic';
|
||||
import { UserService } from '../sys/authority/service/user-service.js';
|
||||
import { PlusService, SysInstallInfo, SysPrivateSettings, SysSettingsService } from '@certd/lib-server';
|
||||
import { nanoid } from 'nanoid';
|
||||
|
||||
@@ -177,11 +177,18 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
||||
}
|
||||
} catch (e) {
|
||||
logger.error("check site error", e);
|
||||
let message = e.message
|
||||
if (!message){
|
||||
message = e.code
|
||||
}
|
||||
if (e.errors &&e.errors.length > 0){
|
||||
message += "\n"+e.errors.map((item:any)=>item.message).join("\n")
|
||||
}
|
||||
await this.update({
|
||||
id: site.id,
|
||||
checkStatus: "error",
|
||||
lastCheckTime: dayjs().valueOf(),
|
||||
error: e.message
|
||||
error: message
|
||||
});
|
||||
if (!notify) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user