mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
Give better feedback when backup delete fails
This commit is contained in:
parent
8bad0fb0a9
commit
42e4bb7e3c
@ -72,9 +72,9 @@ class ApiServersServerBackupsBackupIndexHandler(BaseApiHandler):
|
||||
FileHelpers.del_file(
|
||||
os.path.join(backup_conf["backup_path"], data["filename"])
|
||||
)
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
return self.finish_json(
|
||||
400, {"status": "error", "error": "NO BACKUP FOUND"}
|
||||
400, {"status": "error", "error": f"DELETE FAILED with error {e}"}
|
||||
)
|
||||
self.controller.management.add_to_audit_log(
|
||||
auth_data[4]["user_id"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user