fix(modelmgr): 使用异步请求时的异常类型丢失

This commit is contained in:
Rock Chin
2023-04-08 18:26:08 +08:00
parent 8447b73fcb
commit ffa4b1b4a1
+1 -1
View File
@@ -69,7 +69,7 @@ class ModelRequest:
self.error_info = "{}\n该错误可能是由于http_proxy格式设置错误引起的" self.error_info = "{}\n该错误可能是由于http_proxy格式设置错误引起的"
except Exception as e: except Exception as e:
self.error_info = "{}\n由于请求异常产生的未知错误,请查看日志".format(e) self.error_info = "{}\n由于请求异常产生的未知错误,请查看日志".format(e)
raise Exception(self.error_info) raise type(e)(self.error_info)
def request(self, **kwargs): def request(self, **kwargs):
"""向接口发起请求""" """向接口发起请求"""