AutoRpa/codes/rpa_yisaiqi/errors.py

43 lines
1.0 KiB
Python

"""CONTRACT_CREATE 领域异常及状态中心错误码映射。"""
from __future__ import annotations
class ContractCreateError(RuntimeError):
"""页面元素找不到 / 页面改版(含入参缺失,均不可自动重试)。"""
error_code = "UI_ELEMENT_NOT_FOUND"
retryable = False
route_role = "OPS"
class LoginFailed(ContractCreateError):
"""合同系统登录失败。"""
error_code = "SYS_LOGIN_FAIL"
retryable = True
route_role = "OPS"
class SupplierContractDisabled(ContractCreateError):
"""供应商/客商被禁或失效(含客商加载失败)。"""
error_code = "BIZ_CONTRACT_DISABLED"
retryable = False
route_role = "PURCHASER"
class PdfMergeUnsupported(ContractCreateError):
"""PDF 合并失败或不受支持。"""
error_code = "CAP_PDF_MERGE_UNSUPPORTED"
retryable = False
route_role = "OPS"
class UnknownRpaError(ContractCreateError):
"""未知异常。"""
error_code = "RPA_UNKNOWN_ERROR"
retryable = True
route_role = "OPS"