AuxiliaryLegCancelledError

View as MarkdownOpen in Claude

The application stopped a screen share or removed an additional input device while its leg was still connecting. It is not a failure — the app got what it asked for — but it is typed rather than silently resolved so a caller awaiting the start can tell a cancel apart from a share that actually came up. The public start methods return void, so the rejection is the only signal they have.

Extends

  • Error

Constructors

Constructor

new AuxiliaryLegCancelledError(leg): AuxiliaryLegCancelledError

Parameters

leg
'main' | 'screenshare' | 'additional-device'Required

Which auxiliary leg was removed, e.g. 'screenshare'.

Properties

leg
'main' | 'screenshare' | 'additional-device'Required

Read-only. Which auxiliary leg was removed.

Examples

import { AuxiliaryLegCancelledError } from '@signalwire/js';
try {
await call.self.startScreenShare();
toast('Sharing your screen');
} catch (error) {
if (error instanceof AuxiliaryLegCancelledError) {
// The app called stopScreenShare() while the leg was connecting — nothing to report.
return;
}
throw error;
}

See