CallCreateError

View as MarkdownOpen in Claude

Raised by SignalWire.dial and the inbound-call flow when a call cannot be brought to the connecting state — typical causes are signaling-layer failure, authentication rejection, or the server refusing the call invite. The direction property distinguishes whether the failure occurred while placing an outbound call or accepting an inbound one.

Extends

  • Error

Constructors

Constructor

1new CallCreateError(message, error?, direction?, options?): CallCreateError

Parameters

message
stringRequired

Human-readable error message.

error
unknown

Underlying error that caused the call creation to fail, if any.

direction
'inbound' | 'outbound'

Direction of the call that failed to create.

options
ErrorOptions

Standard ErrorOptions (e.g. cause).

Properties

direction
'inbound' | 'outbound'Required

Direction of the call that failed to create.

error
unknownRequired

Underlying error that caused the call creation to fail, if any.

message
stringRequired

Human-readable error message.

Examples

1import { CallCreateError } from '@signalwire/js';
2
3try {
4 const call = await client.dial('/public/my-room', { audio: true, video: true });
5} catch (err) {
6 if (err instanceof CallCreateError) {
7 console.error(`Failed to create ${err.direction} call:`, err.message, err.error);
8 }
9}