From b128814acf028a7dbdcdef559f34af15cb0e4ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 11 Jan 2020 09:36:50 +0000 Subject: [PATCH] pushover: improve error when image download fails (#30615) --- homeassistant/components/pushover/notify.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/pushover/notify.py b/homeassistant/components/pushover/notify.py index 064ad91b6b9..1930ff66f2e 100644 --- a/homeassistant/components/pushover/notify.py +++ b/homeassistant/components/pushover/notify.py @@ -67,7 +67,11 @@ class PushoverNotificationService(BaseNotificationService): # Replace the attachment identifier with file object. data[ATTR_ATTACHMENT] = response.content else: - _LOGGER.error("Image not found") + _LOGGER.error( + "Failed to download image %s, response code: %d", + data[ATTR_ATTACHMENT], + response.status_code, + ) # Remove attachment key to send without attachment. del data[ATTR_ATTACHMENT] except requests.exceptions.RequestException as ex_val: