Fix media redownload worker retrying on unexpected response codes (#16111)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user