forked from indymedia/epicyon
Handle errors returned from webfinger
parent
335a35b84e
commit
13a16bec18
|
@ -883,6 +883,10 @@ if args.actor:
|
|||
print('Unable to webfinger '+nickname+'@'+domain)
|
||||
sys.exit()
|
||||
|
||||
if wfRequest.get('errors'):
|
||||
print('wfRequest error: '+str(wfRequest['errors']))
|
||||
sys.exit()
|
||||
|
||||
asHeader = {'Accept': 'application/activity+json; profile="https://www.w3.org/ns/activitystreams"'}
|
||||
personUrl = getUserUrl(wfRequest)
|
||||
if nickname==domain:
|
||||
|
|
6
posts.py
6
posts.py
|
@ -1343,6 +1343,11 @@ def sendSignedJson(postJsonObject: {},session,baseDir: str, \
|
|||
print('DEBUG: webfinger for '+handle+' failed')
|
||||
return 1
|
||||
|
||||
if wfRequest.get('errors'):
|
||||
if debug:
|
||||
print('DEBUG: webfinger for '+handle+' failed with errors '+str(wfRequest))
|
||||
return 1
|
||||
|
||||
if not clientToServer:
|
||||
postToBox='inbox'
|
||||
else:
|
||||
|
@ -1596,6 +1601,7 @@ def hasSharedInbox(session,httpPrefix: str,domain: str) -> bool:
|
|||
wfRequest=webfingerHandle(session,domain+'@'+domain,httpPrefix,{}, \
|
||||
None,__version__)
|
||||
if wfRequest:
|
||||
if not wfRequest.get('errors'):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in New Issue