D-ID Client SDK - v3.0.9
    Preparing search index...

    Class ChatModeDowngraded

    The server created the chat in a mode that cannot stream video.

    Raised while connect() runs on a Talks (V2) or Clips (V3) agent, when the chat the server created is in a mode other than the session's (Functional by default) and that mode is not Functional: TextOnly or Maintenance, for instance. The SDK disconnects the stream it had just opened and connect() resolves anyway, so no video will play and onSrcObjectReady will not fire again: the session continues as a text chat.

    It is delivered to onError and never thrown, so connect() does not reject on it. onModeChange fires with the new mode just after it. Treat it as a signal to switch the interface to text, not as a connection failure. kind is 'ChatModeDowngraded'.

    Hierarchy (View Summary)

    Index
    kind: "ChatModeDowngraded" = 'ChatModeDowngraded'

    Always 'ChatModeDowngraded'. Branch on it to tell this failure from the other SDK errors.

    originalError?: unknown

    The error or value that caused this one, when the SDK was wrapping something else.

    For a NetworkError this is the browser's own fetch rejection. It is not serialized as-is: toJson() takes only an Error cause's message.

    • Serializes the error into the JSON-safe ErrorJson payload for logging or reporting.

      The payload always carries kind and the message. The cause's message is added only when originalError is an Error and says something the message does not, truncated to 256 characters; any other cause is dropped. Subclasses extend the payload with the fields listed on their own pages.

      Returns ErrorJson

      The error as plain, JSON-serializable data.

      {
      "kind": "HttpError",
      "code": "InsufficientCreditsError",
      "message": "Account has insufficient credits",
      "httpStatus": 402,
      "endpoint": "/agt_x/chat/cht_y",
      "method": "POST"
      }
      {
      "kind": "NetworkError",
      "message": "Network request failed",
      "cause": "Failed to fetch",
      "endpoint": "/agt_x/chat/cht_y",
      "method": "POST",
      "durationMs": 12,
      "online": false,
      "visibility": "visible"
      }