Give slightly more specific error message
This commit is contained in:
parent
71ac61c01d
commit
b3549c79f4
1 changed files with 2 additions and 0 deletions
|
|
@ -89,6 +89,8 @@ class Person
|
||||||
f = Redfinger.finger(identifier)
|
f = Redfinger.finger(identifier)
|
||||||
rescue SocketError => e
|
rescue SocketError => e
|
||||||
raise "Diaspora server for #{identifier} not found" if e.message =~ /Name or service not known/
|
raise "Diaspora server for #{identifier} not found" if e.message =~ /Name or service not known/
|
||||||
|
rescue Errno::ETIMEDOUT => e
|
||||||
|
raise "Connection timed out to Diaspora server for #{identifier}"
|
||||||
end
|
end
|
||||||
raise "No webfinger profile found at #{identifier}" if f.nil? || f.links.empty?
|
raise "No webfinger profile found at #{identifier}" if f.nil? || f.links.empty?
|
||||||
Person.from_webfinger_profile(identifier, f )
|
Person.from_webfinger_profile(identifier, f )
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue