Commit 9dd54ffb authored by ThibG's avatar ThibG Committed by Eugen Rochko
Browse files

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

parent 16fb39cf
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment