about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2021-05-05 23:46:59 +0200
committerGitHub <noreply@github.com>2021-05-05 23:46:59 +0200
commit6d9ad30bf861b2422c5951f7593a657675fedc24 (patch)
tree9c11fe1743a591cb7914211b6524eee74676dd68 /lib
parentaa1b43f46786ad23098159f1210b1811c64de72a (diff)
Fix media redownload worker retrying on unexpected response codes (#16111)
Diffstat (limited to 'lib')
-rw-r--r--lib/exceptions.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/exceptions.rb b/lib/exceptions.rb
index 7c8e77871..eb472abaa 100644
--- a/lib/exceptions.rb
+++ b/lib/exceptions.rb
@@ -12,7 +12,11 @@ module Mastodon
   class RateLimitExceededError < Error; end
 
   class UnexpectedResponseError < Error
+    attr_reader :response
+
     def initialize(response = nil)
+      @response = response
+
       if response.respond_to? :uri
         super("#{response.uri} returned code #{response.code}")
       else