Log exception occurred in WS service call command (#21584)
This commit is contained in:
parent
48a2e50f84
commit
ee6f09dd29
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue