mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-12 18:58:00 +00:00
Merge branch 'master' into sqldatabase
This commit is contained in:
commit
b73e43a9ff
|
@ -2,7 +2,8 @@ import logging
|
|||
import traceback
|
||||
|
||||
from aiohttp import ClientSession, ClientTimeout, TCPConnector
|
||||
from aiohttp.client_exceptions import ClientConnectorError, ServerTimeoutError
|
||||
from aiohttp.client_exceptions import ClientConnectionError, ClientSSLError
|
||||
from asyncio.exceptions import TimeoutError as AsyncTimeoutError
|
||||
from aputils import Nodeinfo, WellKnownNodeinfo
|
||||
from datetime import datetime
|
||||
from cachetools import LRUCache
|
||||
|
@ -143,12 +144,14 @@ class HttpClient(AppBase):
|
|||
except JSONDecodeError:
|
||||
logging.verbose(f'Failed to parse JSON')
|
||||
|
||||
except (ClientConnectorError, ServerTimeoutError):
|
||||
except ClientSSLError:
|
||||
logging.verbose(f'SSL error when connecting to {urlparse(url).netloc}')
|
||||
|
||||
except (AsyncTimeoutError, ClientConnectionError):
|
||||
logging.verbose(f'Failed to connect to {urlparse(url).netloc}')
|
||||
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
raise e
|
||||
|
||||
|
||||
async def post(self, inbox, message):
|
||||
|
|
Loading…
Reference in a new issue