diff --git a/package.json b/package.json index 5a1a20a..0f5f659 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kevisual/notifier", - "version": "0.0.2", + "version": "0.0.3", "description": "", "main": "index.js", "basename": "/root/notifier", diff --git a/src/notiify/feishu.ts b/src/notiify/feishu.ts index d054b24..c500d66 100644 --- a/src/notiify/feishu.ts +++ b/src/notiify/feishu.ts @@ -11,7 +11,7 @@ export class FeishuNotifier implements Notification { this.webhook = config.webhook; } - async notify(message: string): Promise { + async notify(message: string): Promise { const payload = { msg_type: 'text', content: { @@ -28,7 +28,9 @@ export class FeishuNotifier implements Notification { }); if (!response.ok) { - throw new Error(`飞书推送失败: ${response.statusText}`); + console.error(`飞书推送失败: ${response.statusText}`); + return false; } + return true; } } \ No newline at end of file