From d8f21977991423ccc05027b8db83f39bf53cf642 Mon Sep 17 00:00:00 2001 From: "Abraham (Avi) Soclof" Date: Thu, 15 Oct 2026 13:08:26 +0300 Subject: [PATCH] docs(actors): align createClient actors wording with the actors reference Rewrite the onError JSDoc as a list of when the handler runs, say what error.status holds, and describe the actors field in the same terms as the actors reference (actor sessions, connections, messages). Co-Authored-By: Claude Sonnet 5.5 --- packages/sdk/src/client.types.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/sdk/src/client.types.ts b/packages/sdk/src/client.types.ts index a0fc02d3..c11e464d 100644 --- a/packages/sdk/src/client.types.ts +++ b/packages/sdk/src/client.types.ts @@ -24,10 +24,12 @@ import type { FetchWithAuthInit } from "./utils/fetch-with-auth.js"; */ export interface CreateClientOptions { /** - * Optional error handler that will be called whenever an API error occurs. + * Optional error handler that the SDK calls when: * - * Also receives {@link ActorsModule | actors} connection failures. Errors - * are usually {@linkcode Base44Error} instances — check `error.status`. + * - An API request fails. + * - A client can't connect to an {@link ActorsModule | actor}. + * + * Errors are usually {@linkcode Base44Error} instances. Check `error.status` for the HTTP status code. Returns `undefined` for network errors. */ onError?: (error: Error) => void; /** @@ -137,7 +139,7 @@ export interface Base44Client { appLogs: AppLogsModule; /** {@link AppModule | App module} for reading the app's own public configuration. */ app: AppModule; - /** {@link ActorsModule | Actors module} for subscribing to and sending messages via Cloudflare Durable Object-backed Actors. */ + /** {@link ActorsModule | Actors module} for connecting to actor sessions and exchanging messages with actors. */ actors: ActorsModule; /** {@link AuthModule | Auth module} for user authentication and management. */ auth: AuthModule;