mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-12 04:20:20 +00:00
Handle non-existing backup file (#5590)
* Make the API return 404 for non-existing backup files * Introduce BackupFileNotFoundError exception * Return 404 on full restore as well * Fix remaining API tests * Improve error handling in delete * Fix pytest * Fix tests and change error handling to agreed logic --------- Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
This commit is contained in:
@@ -659,6 +659,10 @@ class BackupJobError(BackupError, JobException):
|
||||
"""Raise on Backup job error."""
|
||||
|
||||
|
||||
class BackupFileNotFoundError(BackupError):
|
||||
"""Raise if the backup file hasn't been found."""
|
||||
|
||||
|
||||
# Security
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user