A platform for community discussion. Free, open, simple.
DEV: Stop logging error response body in FileHelper (#17120)
David Taylore0ff367b49b0
diff --git a/lib/file_helper.rb b/lib/file_helper.rbindex 43427c32289..31530a12e96 100644--- a/lib/file_helper.rb+++ b/lib/file_helper.rb@@ -73,7 +73,7 @@ class FileHelper# attempt error API compatibilityio = FakeIO.newio.status = [response.code, ""]- raise OpenURI::HTTPError.new("#{response.code} Error: #{response.body}", io)+ raise OpenURI::HTTPError.new("#{response.code} Error", io)elselog(:error, "FinalDestination did not work for: #{url}") if verbosethrow :donediff --git a/spec/lib/file_helper_spec.rb b/spec/lib/file_helper_spec.rbindex ae1d721f52d..54c2233a3a8 100644--- a/spec/lib/file_helper_spec.rb+++ b/spec/lib/file_helper_spec.rb@@ -29,7 +29,7 @@ describe FileHelper doexpect(e.io.status[0]).to eq("404")raiseend- end.to raise_error(OpenURI::HTTPError, "404 Error: 404")+ end.to raise_error(OpenURI::HTTPError, "404 Error")endit "does not follow redirects if instructed not to" do