Send localization info on websocket_api script errors (#104638)
* Send localization info on script errors * Use connection exception hander * Keep HomeAssistantError is unknown_error * Move specific exception handling
This commit is contained in:
parent
7dbaf40f48
commit
efd330f182
6 changed files with 106 additions and 3 deletions
|
@ -43,6 +43,12 @@ from tests.common import MockUser
|
|||
"Failed to do X",
|
||||
"Error handling message: Failed to do X (unknown_error) Mock User from 127.0.0.42 (Browser)",
|
||||
),
|
||||
(
|
||||
exceptions.ServiceValidationError("Failed to do X"),
|
||||
websocket_api.ERR_UNKNOWN_ERROR,
|
||||
"Failed to do X",
|
||||
"Error handling message: Failed to do X (unknown_error) Mock User from 127.0.0.42 (Browser)",
|
||||
),
|
||||
(
|
||||
ValueError("Really bad"),
|
||||
websocket_api.ERR_UNKNOWN_ERROR,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue