Error thrown when Device Client operations fail.
Extends PingError to allow per-package instanceof narrowing.
instanceof
try { await client.oath.get();} catch (err) { if (err instanceof DeviceClientError && err.code === 'DEVICE_CLIENT_INVALID_TOKEN') { // trigger re-authentication }} Copy
try { await client.oath.get();} catch (err) { if (err instanceof DeviceClientError && err.code === 'DEVICE_CLIENT_INVALID_TOKEN') { // trigger re-authentication }}
Optional
Static
Error thrown when Device Client operations fail.
Extends PingError to allow per-package
instanceofnarrowing.Example