跳转至

exceptions

feishu.exceptions

FeishuException

Bases: Exception

通用异常

飞书文档

通用错误码

Source code in feishu/exceptions.py
Python
@define
class FeishuException(Exception):
    r"""
    通用异常

    飞书文档:
        [通用错误码](https://open.feishu.cn/document/server-docs/api-call-guide/generic-error-code)
    """

    code: int
    message: str

    def __repr__(self):
        return f"{self.__class__.__name__}(code={self.code}, message={self.message})"

FeishuServerError

Bases: FeishuException

飞书服务器异常

Source code in feishu/exceptions.py
Python
class FeishuServerError(FeishuException):
    r"""
    飞书服务器异常
    """