You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
828 B
Python
36 lines
828 B
Python
"""
|
|
ERP异常定义
|
|
"""
|
|
|
|
from iti.applications.common.exceptions.biz_exp import BizException
|
|
|
|
|
|
class ERPException(BizException):
|
|
"""ERP异常基类"""
|
|
pass
|
|
|
|
|
|
class ERPConnectionError(ERPException):
|
|
"""连接错误"""
|
|
def __init__(self, message: str = "ERP连接失败"):
|
|
super().__init__(message, code=503)
|
|
|
|
|
|
class ERPAuthenticationError(ERPException):
|
|
"""认证错误"""
|
|
def __init__(self, message: str = "ERP认证失败"):
|
|
super().__init__(message, code=401)
|
|
|
|
|
|
class ERPTimeoutError(ERPException):
|
|
"""超时错误"""
|
|
def __init__(self, message: str = "ERP请求超时"):
|
|
super().__init__(message, code=504)
|
|
|
|
|
|
class ERPDataError(ERPException):
|
|
"""数据错误"""
|
|
def __init__(self, message: str = "ERP数据错误"):
|
|
super().__init__(message, code=422)
|
|
|