Browse Source

Avoid redundant HTTP request on some error cases (#10115)

closed-social-v3
ThibG 5 years ago
committed by Eugen Rochko
parent
commit
9dd54ffb1c
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      app/helpers/jsonld_helper.rb

+ 1
- 0
app/helpers/jsonld_helper.rb View File

@ -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…
Cancel
Save