* Raise Home Assistant error in case backup restore fails
This change raises a Home Assistant error in case the backup restore
fails. The Supervisor is checking some common issues before starting
the actual restore in background. This early checks raise an exception
(represented by a HTTP 400 error). This change catches such errors and
raises a Home Assistant error with the message from the Supervisor
exception.
* Add test coverage
* Add backup manager and read writer errors
* Clean up not needed default argument
* Clean up todo comment
* Trap agent bugs during upload
* Always release stream
* Clean up leftover
* Update test for backup with automatic settings
* Fix use of vol.Any
* Refactor test helper
* Only update successful timestamp if completed event is sent
* Always delete surplus copies
* Fix after rebase
* Fix after rebase
* Revert "Fix use of vol.Any"
This reverts commit 28fd7a544899bb6ed05f771e9e608bc5b41d2b5e.
* Inherit BackupReaderWriterError in IncorrectPasswordError
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add backup manager and read writer errors
* Clean up not needed default argument
* Clean up todo comment
* Trap agent bugs during upload
* Always release stream
* Clean up leftover
* Update test for backup with automatic settings
* Fix use of vol.Any
* Refactor test helper
* Only update successful timestamp if completed event is sent
* Always delete surplus copies
* Fix after rebase
* Fix after rebase
* Revert "Fix use of vol.Any"
This reverts commit 28fd7a544899bb6ed05f771e9e608bc5b41d2b5e.
* Inherit BackupReaderWriterError in IncorrectPasswordError
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Raise Home Assistant error in case backup restore fails
This change raises a Home Assistant error in case the backup restore
fails. The Supervisor is checking some common issues before starting
the actual restore in background. This early checks raise an exception
(represented by a HTTP 400 error). This change catches such errors and
raises a Home Assistant error with the message from the Supervisor
exception.
* Add test coverage