From 9c9b7ec2ed3b4905ffdf9f7b3954e76ebdb34de2 Mon Sep 17 00:00:00 2001 From: db0 Date: Thu, 7 Sep 2023 18:22:21 +0200 Subject: [PATCH] Avoid unhandled 500 on problem retrieving admins --- fediseer/messaging.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fediseer/messaging.py b/fediseer/messaging.py index 43cf2e2..483e60c 100644 --- a/fediseer/messaging.py +++ b/fediseer/messaging.py @@ -149,7 +149,10 @@ class ActivityPubPM: return None admins = database.find_admins_by_instance(instance) if not admins: - admins = get_admin_for_software(software, domain) + try: + admins = get_admin_for_software(software, domain) + except Exception as err: + raise e.BadRequest(f"Failed to retrieve admin list: {err}") else: admins = [a.username for a in admins] if not admins: