0
0
Fork 0

Fix media redownload worker retrying on unexpected response codes (#16111)

This commit is contained in:
Eugen Rochko 2021-05-05 23:46:59 +02:00 committed by GitHub
parent aa1b43f467
commit 6d9ad30bf8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -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