Catch uncaught Alexa error (#24785)
This commit is contained in:
1 parent
71346760d0
commit
c87d6e4720
2 files changed
+41
-3
No files matched your search
@@ -23,7 +23,7 @@ from homeassistant.components.google_assistant import helpers as google_helpers
|
||||
from .const import (
|
||||
DOMAIN, REQUEST_TIMEOUT, PREF_ENABLE_ALEXA, PREF_ENABLE_GOOGLE,
|
||||
PREF_GOOGLE_SECURE_DEVICES_PIN, InvalidTrustedNetworks,
|
||||
InvalidTrustedProxies, PREF_ALEXA_REPORT_STATE)
|
||||
InvalidTrustedProxies, PREF_ALEXA_REPORT_STATE, RequireRelink)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -388,7 +388,7 @@ async def websocket_update_prefs(hass, connection, msg):
|
||||
connection.send_error(msg['id'], 'alexa_timeout',
|
||||
'Timeout validating Alexa access token.')
|
||||
return
|
||||
except alexa_errors.NoTokenAvailable:
|
||||
except (alexa_errors.NoTokenAvailable, RequireRelink):
|
||||
connection.send_error(
|
||||
msg['id'], 'alexa_relink',
|
||||
'Please go to the Alexa app and re-link the Home Assistant '
|
||||
|
||||
Reference in new issue
Block a user