about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authoralpaca-tc <alpaca-tc@alpaca.tc>2017-05-06 19:55:59 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-06 12:55:59 +0200
commit1f15a15621860d97107c2be420af8925756970c5 (patch)
treef032f5c34d52a5b276e1b7b50139c0fc092f4dbf /app
parentfd1e29c3f878868d6fcc5ba9803662a4c1923dcf (diff)
Handling failed http response (#2823)
Diffstat (limited to 'app')
-rw-r--r--app/services/follow_remote_account_service.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/services/follow_remote_account_service.rb b/app/services/follow_remote_account_service.rb
index 0b5abf58a..1e8a53c2d 100644
--- a/app/services/follow_remote_account_service.rb
+++ b/app/services/follow_remote_account_service.rb
@@ -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