Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

rescue RestClient::RequestFailed instead of RestClient::RequestTimeou…

…t; broader error, also includes HTTP 500 etc
  • Loading branch information...
commit fcaaa4aab40146ae97f242718309ffc8028881d2 1 parent f04ffae
Bartosz Dziewoński authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 zb.rb
6 zb.rb
View
@@ -175,7 +175,7 @@ def graph.walk &block
end
end
end
- rescue Timeout::Error, Errno::ETIMEDOUT, RestClient::RequestTimeout
+ rescue Timeout::Error, Errno::ETIMEDOUT, RestClient::RequestFailed
puts "Timed out while listing categories for #{root}; retrying..."
retry
end
@@ -208,7 +208,7 @@ def graph.walk &block
new_titles = list_of_titles()
user_notif_sett = get_user_notification_settings()
end
- rescue Timeout::Error, Errno::ETIMEDOUT, RestClient::RequestTimeout
+ rescue Timeout::Error, Errno::ETIMEDOUT, RestClient::RequestFailed
puts "Timed out while downloading list of titles or user settings; retrying..."
retry
end
@@ -260,7 +260,7 @@ def graph.walk &block
puts "Notifying #{ns}:#{page} about #{articles_hash.map{|a| a[0]}.join(', ')}."
notify_user_zb ns, page, articles_hash
end
- rescue Timeout::Error, Errno::ETIMEDOUT, RestClient::RequestTimeout
+ rescue Timeout::Error, Errno::ETIMEDOUT, RestClient::RequestFailed
puts "Timed out; retrying..."
retry
end
Please sign in to comment.
Something went wrong with that request. Please try again.