Skip to content

Commit 96c179c

Browse files
committed
refactor: 发送kook消息失败时,若非网络错误,则会抛出错误
1 parent 872d762 commit 96c179c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

astrbot/core/platform/sources/kook/kook_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,8 @@ async def send_text(
342342
raise RuntimeError(
343343
f'发送kook消息类型 "{kook_message_type.name}" HTTP错误: {resp.status} , 响应内容 : {await resp.text()}'
344344
)
345+
except RuntimeError:
346+
raise
345347
except Exception as e:
346348
logger.error(
347349
f'[KOOK] 发送kook消息类型 "{kook_message_type.name}" 异常: {e}'

0 commit comments

Comments
 (0)