D-ID Client SDK - v3.0.0-0
    Preparing search index...

    Interface ErrorJson

    The JSON-safe payload toJson() produces, for logs and error reports.

    Only the fields the SDK deliberately exposes are present, so the payload can be forwarded to a logging service as it is. Subclasses add their own keys: HttpError adds code and httpStatus and, when the failing call is known, endpoint and method; NetworkError adds endpoint, method, durationMs, online and visibility.

    {
    "kind": "HttpError",
    "code": "InsufficientCreditsError",
    "message": "Account has insufficient credits",
    "httpStatus": 402,
    "endpoint": "/agt_x/chat/cht_y",
    "method": "POST"
    }
    interface ErrorJson {
        cause?: string;
        code?: string;
        kind: string;
        message: string;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown

      Additional fields contributed by a subclass, such as httpStatus on HttpError.

      Typed unknown, so a key that is not declared above has to be narrowed before it is used.

    Index
    cause?: string

    Message of the error that caused this one, truncated to 256 characters.

    Present only when originalError is an Error and its message differs from message. A cause that is not an Error is never serialized, so an arbitrary object carrying credentials cannot end up in the payload.

    code?: string

    The Agents API's own classification of the failure, from code.

    Present on an HttpError only.

    kind: string

    Stable machine-readable code for the failure — the error's kind.

    message: string

    Human-readable description of the failure — the error's message.