mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Catch uncaught Alexa error (#24785)
This commit is contained in:
@@ -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