Make WS command render_template not give up if initial render raises (#99808)

This commit is contained in:
Erik Montnemery 2023-09-08 21:02:06 +02:00 committed by GitHub
parent b317e04cf1
commit 1654ef7759
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 281 additions and 74 deletions

View file

@ -542,9 +542,8 @@ async def handle_render_template(
timed_out = await template_obj.async_render_will_timeout(
timeout, variables, strict=msg["strict"], log_fn=log_fn
)
except TemplateError as ex:
connection.send_error(msg["id"], const.ERR_TEMPLATE_ERROR, str(ex))
return
except TemplateError:
timed_out = False
if timed_out:
connection.send_error(
@ -583,7 +582,6 @@ async def handle_render_template(
hass,
[TrackTemplate(template_obj, variables)],
_template_listener,
raise_on_template_error=True,
strict=msg["strict"],
log_fn=log_fn,
)