mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-28 20:41:46 +00:00
Don't crash if nodeinfo is unavailable.
This commit is contained in:
parent
58630a053f
commit
52eeabc5bb
1 changed files with 4 additions and 0 deletions
|
@ -114,6 +114,10 @@ def get_or_create_remote_server(domain):
|
|||
'https://%s/.well-known/nodeinfo' % domain,
|
||||
headers={'Accept': 'application/activity+json'}
|
||||
)
|
||||
|
||||
if response.status_code != 200:
|
||||
return None
|
||||
|
||||
data = response.json()
|
||||
try:
|
||||
nodeinfo_url = data.get('links')[0].get('href')
|
||||
|
|
Loading…
Reference in a new issue