> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # DeviceTokenError > Thrown when device token issuance or validation fails. 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 ```ts new DeviceTokenError(message, originalError?): DeviceTokenError ``` ### Parameters **`message`** `string` — required 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** ```ts import { DeviceTokenError } from '@signalwire/js'; client.errors$.subscribe((err) => { if (err instanceof DeviceTokenError) { console.error('device token failure:', err.message, err.originalError); redirectToLogin(); } }); ``` > Thrown when device token issuance or validation fails.