Skip to content

Interface: VurbClientOptions

Defined in: packages/core/src/client/VurbClient.ts:144

Options for creating a VurbClient.

Properties

discriminatorKey?

ts
optional discriminatorKey: string;

Defined in: packages/core/src/client/VurbClient.ts:179

Key used as the discriminator when calling grouped tools.

Must match the discriminator key configured on the server (e.g. group.discriminator('command')).

Default

ts
'action'

middleware?

ts
optional middleware: ClientMiddleware[];

Defined in: packages/core/src/client/VurbClient.ts:158

Client-side middleware pipeline.

Middleware execute in registration order (first = outermost). Each middleware can modify the request, response, or both.

Example

typescript
const client = createVurbClient<AppRouter>(transport, {
    middleware: [authMiddleware, loggingMiddleware],
});

throwOnError?

ts
optional throwOnError: boolean;

Defined in: packages/core/src/client/VurbClient.ts:169

When true, execute() throws a VurbClientError for responses with isError: true.

When false (default), error responses are returned normally and the caller must check result.isError.

Default

ts
false