mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-27 10:30:15 -05:00
Avoid redundant HTTP request on some error cases (#10115)
This commit is contained in:
parent
16fb39cffc
commit
9dd54ffb1c
@ -68,6 +68,7 @@ module JsonLdHelper
|
||||
return body_to_json(response.body_with_limit) if response.code == 200
|
||||
end
|
||||
# If request failed, retry without doing it on behalf of a user
|
||||
return if on_behalf_of.nil?
|
||||
build_request(uri).perform do |response|
|
||||
response.code == 200 ? body_to_json(response.body_with_limit) : nil
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user