mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-18 05:12:18 +00:00
Fix method return when rescuing
This commit is contained in:
parent
04bbc57690
commit
852c82435d
|
@ -21,7 +21,9 @@ class FetchRemoteAccountService < BaseService
|
|||
return FollowRemoteAccountService.new.call("#{username}@#{domain}")
|
||||
rescue TypeError => e
|
||||
Rails.logger.debug "Unparseable URL given: #{url}"
|
||||
nil
|
||||
rescue Nokogiri::XML::XPath::SyntaxError
|
||||
Rails.logger.debug "Invalid XML or missing namespace"
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
|
|
@ -33,5 +33,6 @@ class FetchRemoteStatusService < BaseService
|
|||
return FollowRemoteAccountService.new.call("#{username}@#{domain}")
|
||||
rescue Nokogiri::XML::XPath::SyntaxError
|
||||
Rails.logger.debug "Invalid XML or missing namespace"
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue