mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
pushover: improve error when image download fails (#30615)
This commit is contained in:
parent
9c551ae85d
commit
b128814acf
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user