Remove crazy JSON encoding things that are no longer used (#13029)
Catch JSON encoding errors in HTTP view
This commit is contained in:
parent
ae286a550b
commit
0a2e949e0a
4 changed files with 28 additions and 15 deletions
|
@ -240,7 +240,11 @@ class ActiveConnection:
|
|||
if message is None:
|
||||
break
|
||||
self.debug("Sending", message)
|
||||
await self.wsock.send_json(message, dumps=JSON_DUMP)
|
||||
try:
|
||||
await self.wsock.send_json(message, dumps=JSON_DUMP)
|
||||
except TypeError as err:
|
||||
_LOGGER.error('Unable to serialize to JSON: %s\n%s',
|
||||
err, message)
|
||||
|
||||
@callback
|
||||
def send_message_outside(self, message):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue