diff --git a/relay/views/activitypub.py b/relay/views/activitypub.py index 50b4bb6..00a1d76 100644 --- a/relay/views/activitypub.py +++ b/relay/views/activitypub.py @@ -1,6 +1,7 @@ import aputils import traceback +from aiohttp import ClientConnectorError from aiohttp.web import Request from blib import HttpError @@ -104,6 +105,10 @@ class ActorView(View): logging.debug('HTTP Status %i: %s', e.status, e.message) raise HttpError(400, 'failed to fetch actor') + except ClientConnectorError as e: + logging.warning('Error when trying to fetch actor: %s, %s', self.signature.keyid, str(e)) + raise HttpError(400, 'failed to fetch actor') + except Exception: traceback.print_exc() raise HttpError(500, 'unexpected error when fetching actor')