diff --git a/app/lib/webfinger.rb b/app/lib/webfinger.rb index aa5bcbe2a7b..67c62a27269 100644 --- a/app/lib/webfinger.rb +++ b/app/lib/webfinger.rb @@ -61,6 +61,8 @@ class Webfinger raise Webfinger::Error, "Invalid JSON in response for #{@uri}" rescue Addressable::URI::InvalidURIError raise Webfinger::Error, "Invalid URI for #{@uri}" + rescue *Mastodon::HTTP_CONNECTION_ERRORS => e + raise Webfinger::Error, "Error performing webfinger query for #{@uri}: #{e}" end private diff --git a/app/models/remote_follow.rb b/app/models/remote_follow.rb index f9719b86707..1022b9a4df1 100644 --- a/app/models/remote_follow.rb +++ b/app/models/remote_follow.rb @@ -66,7 +66,7 @@ class RemoteFollow def acct_resource @acct_resource ||= Webfinger.new("acct:#{acct}").perform - rescue Webfinger::Error, *Mastodon::HTTP_CONNECTION_ERRORS + rescue Webfinger::Error nil end