feat:优化节点错误处理

This commit is contained in:
2026-09-29 08:17:58 -07:00
parent 352d144823
commit 6a38a5f15e
8 changed files with 113 additions and 50 deletions
-2
View File
@@ -17,8 +17,6 @@ class BizException(AppError):
"""可安全返回给调用方的业务错误"""
def __init__(self, code: int, msg: str = "请求失败") -> None:
if not 400 <= code <= 599:
raise ValueError("业务错误码必须是 400 到 599 的 HTTP 状态码")
self.code = code
self.msg = msg
super().__init__(msg)