mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-22 14:38:00 +00:00
catch ClientConnectorError
when fetching actor
This commit is contained in:
parent
5a9d1836d0
commit
098998084d
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue