mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
Log exception occurred in WS service call command (#21584)
This commit is contained in:
parent
48a2e50f84
commit
ee6f09dd29
@ -151,9 +151,11 @@ async def handle_call_service(hass, connection, msg):
|
||||
connection.send_message(messages.error_message(
|
||||
msg['id'], const.ERR_NOT_FOUND, 'Service not found.'))
|
||||
except HomeAssistantError as err:
|
||||
connection.logger.exception(err)
|
||||
connection.send_message(messages.error_message(
|
||||
msg['id'], const.ERR_HOME_ASSISTANT_ERROR, '{}'.format(err)))
|
||||
except Exception as err: # pylint: disable=broad-except
|
||||
connection.logger.exception(err)
|
||||
connection.send_message(messages.error_message(
|
||||
msg['id'], const.ERR_UNKNOWN_ERROR, '{}'.format(err)))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user