give str(Exception) when webfinger fails

This commit is contained in:
jesopo 2020-03-08 18:45:15 +00:00
parent 142d181048
commit d5d097d8ee

View file

@ -62,8 +62,9 @@ def find_actor(username, instance):
try:
webfinger = activity_request(webfinger_url, type=JRD_TYPE)
except:
raise FindActorException("Failed to get webfinger for %s" % instance)
except Exception as e:
raise FindActorException("Failed to get webfinger for %s: %s" %
(instance, str(e)))
actor_url = None
if webfinger.code == 200: