feat:优化节点错误处理
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user