CallNotReadyError

View as MarkdownOpen in Claude

Every member RPC is addressed with the local leg’s { node_id, call_id, member_id } triple, and the server delivers selfId/nodeId only on call.joined. Until then there is nothing to route with, so the SDK fails fast instead of sending a doomed request.

Wait for selfId$ — or for self$, which withholds emission until self exists — before issuing call control.

Extends

  • Error

Constructors

Constructor

new CallNotReadyError(callId, options?): CallNotReadyError

Parameters

callId
stringRequired

ID of the call that has no self member context yet.

options
ErrorOptions

Standard ErrorOptions, e.g. { cause }.

Properties

callId
stringRequired

ID of the call that has no self member context yet.

Examples

import { CallNotReadyError } from '@signalwire/js';
import { firstValueFrom } from 'rxjs';
try {
await call.toggleLock();
} catch (error) {
if (error instanceof CallNotReadyError) {
await firstValueFrom(call.self$);
await call.toggleLock();
}
}

See