Print client error in rest_command (#67900)

This commit is contained in:
Hmmbob
2022-03-12 05:34:06 +01:00
committed by GitHub
parent c5800d6103
commit c8351387d7

View File

@@ -144,8 +144,12 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
except asyncio.TimeoutError: except asyncio.TimeoutError:
_LOGGER.warning("Timeout call %s", request_url) _LOGGER.warning("Timeout call %s", request_url)
except aiohttp.ClientError: except aiohttp.ClientError as err:
_LOGGER.error("Client error %s", request_url) _LOGGER.error(
"Client error. Url: %s. Error: %s",
request_url,
err,
)
# register services # register services
hass.services.async_register(DOMAIN, name, async_service_handler) hass.services.async_register(DOMAIN, name, async_service_handler)