diff options
author | ThibG <thib@sitedethib.com> | 2019-02-25 15:54:17 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-02-25 15:54:17 +0100 |
commit | 9dd54ffb1c04dd7ba216a4420efce75fb9f603e7 (patch) | |
tree | 47584f3eaf02b127fe80a4d6345267e62b625dd7 /app | |
parent | 16fb39cffc0a959220e376817672f010da87c995 (diff) |
Avoid redundant HTTP request on some error cases (#10115)
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/jsonld_helper.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/helpers/jsonld_helper.rb b/app/helpers/jsonld_helper.rb index 532397272..59e4ae685 100644 --- a/app/helpers/jsonld_helper.rb +++ b/app/helpers/jsonld_helper.rb @@ -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 |