mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-05 17:31:12 +00:00
Fix Style/GuardClause
in worker rescues (#35508)
This commit is contained in:
parent
a863e68d17
commit
e5e977c24f
|
@ -22,11 +22,7 @@ class MentionResolveWorker
|
||||||
rescue Mastodon::UnexpectedResponseError => e
|
rescue Mastodon::UnexpectedResponseError => e
|
||||||
response = e.response
|
response = e.response
|
||||||
|
|
||||||
if response_error_unsalvageable?(response)
|
raise(e) unless response_error_unsalvageable?(response)
|
||||||
# Give up
|
|
||||||
else
|
|
||||||
raise e
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -20,10 +20,6 @@ class RedownloadAvatarWorker
|
||||||
rescue Mastodon::UnexpectedResponseError => e
|
rescue Mastodon::UnexpectedResponseError => e
|
||||||
response = e.response
|
response = e.response
|
||||||
|
|
||||||
if response_error_unsalvageable?(response)
|
raise(e) unless response_error_unsalvageable?(response)
|
||||||
# Give up
|
|
||||||
else
|
|
||||||
raise e
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,10 +20,6 @@ class RedownloadHeaderWorker
|
||||||
rescue Mastodon::UnexpectedResponseError => e
|
rescue Mastodon::UnexpectedResponseError => e
|
||||||
response = e.response
|
response = e.response
|
||||||
|
|
||||||
if response_error_unsalvageable?(response)
|
raise(e) unless response_error_unsalvageable?(response)
|
||||||
# Give up
|
|
||||||
else
|
|
||||||
raise e
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,10 +20,6 @@ class RedownloadMediaWorker
|
||||||
rescue Mastodon::UnexpectedResponseError => e
|
rescue Mastodon::UnexpectedResponseError => e
|
||||||
response = e.response
|
response = e.response
|
||||||
|
|
||||||
if response_error_unsalvageable?(response)
|
raise(e) unless response_error_unsalvageable?(response)
|
||||||
# Give up
|
|
||||||
else
|
|
||||||
raise e
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,10 +15,6 @@ class RemoteAccountRefreshWorker
|
||||||
rescue Mastodon::UnexpectedResponseError => e
|
rescue Mastodon::UnexpectedResponseError => e
|
||||||
response = e.response
|
response = e.response
|
||||||
|
|
||||||
if response_error_unsalvageable?(response)
|
raise(e) unless response_error_unsalvageable?(response)
|
||||||
# Give up
|
|
||||||
else
|
|
||||||
raise e
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user