Browse Source

Handling failed http response (#2823)

master
alpaca-tc 7 years ago
committed by Eugen Rochko
parent
commit
1f15a15621
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      app/services/follow_remote_account_service.rb

+ 1
- 0
app/services/follow_remote_account_service.rb View File

@ -75,6 +75,7 @@ class FollowRemoteAccountService < BaseService
def get_feed(url)
response = http_client(write: 20, connect: 20, read: 50).get(Addressable::URI.parse(url).normalize)
raise Goldfinger::Error, "Feed attempt failed for #{url}: HTTP #{response.code}" unless response.code == 200
[response.to_s, Nokogiri::XML(response)]
end

Loading…
Cancel
Save