Theia API Documentation v1.77.0
    Preparing search index...

    Implements

    Index
    logger: ILogger
    • Calls the backend model and flattens any thrown error's cause chain into its message.

      This is the single choke point where backend errors are still complete: the RPC error extension that serializes this rejection to the frontend only keeps code, data, message, name and stack, dropping cause. Node's fetch (undici) reports network failures as an opaque TypeError: fetch failed with the actionable reason (ECONNREFUSED, ENOTFOUND, TLS errors, ...) on error.cause, so without flattening here the frontend would only ever see "fetch failed". Flattening the chain into the message preserves the real reason across RPC.

      Parameters

      Returns Promise<LanguageModelResponse>