From 36445732d29b29a54707189fc03789af731cc7be Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Wed, 4 Oct 2023 12:09:54 +0200 Subject: [PATCH] catch exceptions in migrations for extensions (#1987) --- lnbits/commands.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lnbits/commands.py b/lnbits/commands.py index 3dcab0f2b..44e55681b 100644 --- a/lnbits/commands.py +++ b/lnbits/commands.py @@ -93,7 +93,10 @@ async def migrate_databases(): for ext in get_valid_extensions(): current_version = current_versions.get(ext.code, 0) - await migrate_extension_database(ext, current_version) + try: + await migrate_extension_database(ext, current_version) + except Exception as e: + logger.exception(f"Error migrating extension {ext.code}: {e}") logger.info("✔️ All migrations done.")