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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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