mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-11 12:08:30 +08:00
refactor: 改进上游错误消息的提取和传递
- 新增 extract_error_message 工具函数,统一错误消息提取逻辑 - 在 HTTPStatusError 异常上附加 upstream_response 属性,保留原始错误 - 优先使用上游响应内容作为错误消息,而非异常字符串表示 - 移除错误消息的长度限制(500/1000 字符) - 修复边界条件检查,使用 startswith 匹配 "Unable to read" 前缀 - 简化 result.py 中的条件判断逻辑
This commit is contained in:
@@ -47,7 +47,6 @@ if TYPE_CHECKING:
|
||||
from src.api.handlers.base.stream_context import StreamContext
|
||||
|
||||
|
||||
|
||||
class MessageTelemetry:
|
||||
"""
|
||||
负责记录 Usage/Audit,避免处理器里重复代码。
|
||||
|
||||
Reference in New Issue
Block a user