mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Log cloud backup upload response status (#134871)
Log the status of the upload response
This commit is contained in:
parent
58805f721c
commit
e5c986171b
@ -181,6 +181,11 @@ class CloudBackupAgent(BackupAgent):
|
||||
headers=details["headers"] | {"content-length": str(backup.size)},
|
||||
timeout=ClientTimeout(connect=10.0, total=43200.0), # 43200s == 12h
|
||||
)
|
||||
_LOGGER.log(
|
||||
logging.DEBUG if upload_status.status < 400 else logging.WARNING,
|
||||
"Backup upload status: %s",
|
||||
upload_status.status,
|
||||
)
|
||||
upload_status.raise_for_status()
|
||||
except (TimeoutError, ClientError) as err:
|
||||
raise BackupAgentError("Failed to upload backup") from err
|
||||
|
Loading…
x
Reference in New Issue
Block a user