For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /reference/sdk/sapi/service/classes/ServiceError.md.
  • 简体中文
  • Class: ServiceError

    Defined in: sapi/service/client.ts:28

    跨模块服务调用异常(包含服务端返回的业务 code 与 HTTP status)。

    Extends

    • Error

    Constructors

    Constructor

    new ServiceError(
       message: string, 
       code: string, 
       status: number): ServiceError;

    Defined in: sapi/service/client.ts:33

    Parameters

    ParameterType
    messagestring
    codestring
    statusnumber

    Returns

    ServiceError

    Overrides

    Error.constructor

    Properties

    PropertyTypeDescriptionDefined in
    codestring错误码(例如 "use_tx_call"、"unauthorized"、"not_found")。sapi/service/client.ts:30
    statusnumberHTTP 状态码;网络异常时为 0。sapi/service/client.ts:32