mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-14 11:37:59 +00:00
catch ClientConnectorError
when fetching actor
This commit is contained in:
parent
5a9d1836d0
commit
098998084d
|
@ -1,6 +1,7 @@
|
||||||
import aputils
|
import aputils
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
from aiohttp import ClientConnectorError
|
||||||
from aiohttp.web import Request
|
from aiohttp.web import Request
|
||||||
from blib import HttpError
|
from blib import HttpError
|
||||||
|
|
||||||
|
@ -104,6 +105,10 @@ class ActorView(View):
|
||||||
logging.debug('HTTP Status %i: %s', e.status, e.message)
|
logging.debug('HTTP Status %i: %s', e.status, e.message)
|
||||||
raise HttpError(400, 'failed to fetch actor')
|
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:
|
except Exception:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
raise HttpError(500, 'unexpected error when fetching actor')
|
raise HttpError(500, 'unexpected error when fetching actor')
|
||||||
|
|
Loading…
Reference in a new issue