diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 234cdb8de9e7b9b8519a217c1a3f19118f152856..26f2638b7ec168371d48c1e8a0f85d4766598ba4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -21,6 +21,7 @@ Fixed * Phone numbers were not properly linked and suboptimally formatted on person page * Favicon upload failed with S3 storage. * Some preferences were required when they shouldn't, and vice versa. +* IO errors on accessing backup directory in health check are now properly reported `2.6`_ - 2022-01-10 ------------------- diff --git a/aleksis/core/health_checks.py b/aleksis/core/health_checks.py index 282dce248c7a7f4c7b515d80c14c3ee0ba38108b..de99fb72a95ca176b5daa5f75981ab13581b26aa 100644 --- a/aleksis/core/health_checks.py +++ b/aleksis/core/health_checks.py @@ -33,7 +33,13 @@ class BaseBackupHealthCheck(BaseHealthCheckBackend): def check_status(self): storage = get_storage() - backups = storage.list_backups(content_type=self.content_type) + + try: + backups = storage.list_backups(content_type=self.content_type) + except Exception as ex: + self.add_error(_("Error accessing backup storage: {}").format(str(ex))) + return + if backups: last_backup = backups[:1] last_backup_time = dbbackup_utils.filename_to_date(last_backup[0])