Skip to Content

executeRPC

async function executeRPC(request: { requestId: string fnKey: string args: unknown[] }): Promise<RpcResponse>

Inputs

FieldDescription
requestIdCorrelates logs and client UI; echoed on RpcResponse.
fnKeyMust be ClassName.methodName (see Registry).
argsPositional arguments in registry order; length must match RegistryEntry.params.length.

Successful response

status: 'ok' includes JSON-safe result (subject to serialization settings), returnType, optional returnShape from getShape, label when a Return path was taken, and duration.

Validation hooks

When enabled globally, params JSON Schema and return JSON Schema may run before/after invoke — see params and return validation pages.

Timeouts

setInvokeTimeoutMs (or bootstrap / Socket.IO options) bounds how long executeRPC waits on the handler. On expiry you receive an error RpcResponse with code INVOKE_TIMEOUT.

See also