diff --git a/libervia/backend/plugins/plugin_comp_ap_gateway/__init__.py b/libervia/backend/plugins/plugin_comp_ap_gateway/__init__.py index 2648938c..8670aa83 100644 --- a/libervia/backend/plugins/plugin_comp_ap_gateway/__init__.py +++ b/libervia/backend/plugins/plugin_comp_ap_gateway/__init__.py @@ -2277,7 +2277,14 @@ class APGateway: return mess_data actor_account = self._e.unescape(mess_data["to"].user) - actor_id = await self.get_ap_actor_id_from_account(actor_account) + try: + actor_id = await self.get_ap_actor_id_from_account(actor_account) + except Exception as e: + log.warning( + f"Can't retrieve data on actor {actor_account}: {e}" + ) + # TODO: send an error + return mess_data inbox = await self.get_ap_inbox_from_id(actor_id, use_shared=False) try: @@ -2313,7 +2320,13 @@ class APGateway: "name": f"@{actor_account}", }) - await self.sign_and_post(inbox, ap_item["actor"], ap_item) + try: + await self.sign_and_post(inbox, ap_item["actor"], ap_item) + except Exception as e: + # TODO: send an error + log.warning( + f"Can't send message to {inbox}: {e}" + ) return mess_data async def _on_message_retract(