From 827ba5cd2d3308e88fd6123a25828351c9bd8f38 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 21 Aug 2022 09:22:14 +0200 Subject: [PATCH] Improve inbox processing --- app/boxes.py | 2 ++ app/incoming_activities.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/boxes.py b/app/boxes.py index cac6b49..495b38d 100644 --- a/app/boxes.py +++ b/app/boxes.py @@ -351,6 +351,8 @@ async def fetch_conversation_root( db_session, ap.get_actor_id(raw_reply) ) in_reply_to_object = RemoteObject(raw_reply, actor=raw_reply_actor) + except (ap.ObjectNotFoundError, ap.ObjectIsGoneError): + return await fetch_conversation_root(db_session, obj, is_root=True) except httpx.HTTPStatusError as http_status_error: if 400 <= http_status_error.response.status_code < 500: # We may not have access, in this case consider if root diff --git a/app/incoming_activities.py b/app/incoming_activities.py index b52fa92..e803ad9 100644 --- a/app/incoming_activities.py +++ b/app/incoming_activities.py @@ -119,7 +119,7 @@ async def process_next_incoming_activity( ) except httpx.TimeoutException as exc: url = exc._request.url if exc._request else None - logger.error(f"HTTP timeout when fetching {url}") + logger.error(f"Failed, HTTP timeout when fetching {url}") next_activity.error = traceback.format_exc() _set_next_try(next_activity) except Exception: