DeviceTokenError

View as MarkdownOpen in Claude

Raised when the SDK cannot obtain or validate a device token from the auth backend. Surfaces both during the initial token exchange and on subsequent re-issue attempts. When this fires the session is not authenticated; check the underlying error for HTTP-status detail and decide whether to prompt the user to re-authenticate or retry.

Extends

  • Error

Constructors

Constructor

1new DeviceTokenError(message, originalError?): DeviceTokenError

Parameters

message
stringRequired

Human-readable error message.

originalError
unknown

Underlying error raised during device-token issuance or validation.

Properties

originalError
unknown

Underlying error raised during device-token issuance or validation.

Examples

1import { DeviceTokenError } from '@signalwire/js';
2
3client.errors$.subscribe((err) => {
4 if (err instanceof DeviceTokenError) {
5 console.error('device token failure:', err.message, err.originalError);
6 redirectToLogin();
7 }
8});