mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-12-22 11:11:09 +00:00
prevent errors in post and fetch_nodeinfo
This commit is contained in:
parent
7d37ec8145
commit
8f16cab048
|
@ -159,7 +159,7 @@ class HttpClient:
|
|||
return logging.verbose(await resp.read()) # change this to debug
|
||||
|
||||
except (ClientConnectorError, ServerTimeoutError):
|
||||
logging.verbose(f'Failed to connect to {url.netloc}')
|
||||
logging.verbose(f'Failed to connect to {url}')
|
||||
|
||||
## prevent workers from being brought down
|
||||
except Exception as e:
|
||||
|
@ -174,6 +174,10 @@ class HttpClient:
|
|||
loads = WellKnownNodeinfo.new_from_json
|
||||
)
|
||||
|
||||
if not wk_nodeinfo:
|
||||
logging.verbose(f'Failed to fetch well-known nodeinfo url for domain: {domain}')
|
||||
return False
|
||||
|
||||
for version in ['20', '21']:
|
||||
try:
|
||||
nodeinfo_url = wk_nodeinfo.get_url(version)
|
||||
|
|
Loading…
Reference in a new issue