[BUG] device.register()
get stuck when the WebSocket fails to connect
#231
Labels
device.register()
get stuck when the WebSocket fails to connect
#231
or sensitive account information (API keys, credentials, etc.) when reporting this issue.
Code to reproduce the issue:
While attempting to initialize a Twilio Device with an expired token results in the failure of executing subsequent code following the invocation of
await device.register()
.This occurs due to the Twilio WebSocket being closed caused by the token expiration, preventing the
register()
promise to be resolve/reject.Expected behavior:
The
.register()
function should throw an error indicating that the device has failed to register.Actual behavior:
register()
promise never resolves.Software versions:
The text was updated successfully, but these errors were encountered: