diff --git a/lib/pact_broker/api/renderers/html_pact_renderer.rb b/lib/pact_broker/api/renderers/html_pact_renderer.rb
index dbe1f3e42..2f6560474 100644
--- a/lib/pact_broker/api/renderers/html_pact_renderer.rb
+++ b/lib/pact_broker/api/renderers/html_pact_renderer.rb
@@ -159,8 +159,7 @@ def html
def consumer_contract
Pact::ConsumerContract.from_json(@json_content)
rescue => e
- logger.warn "#{e.class} #{e.message} #{e.backtrace.join("\n")}"
- logger.warn "Could not parse the following content to a Pact, showing raw content instead: #{@json_content}"
+ logger.info "Could not parse the following content to a Pact due to #{e.class} #{e.message}, showing raw content instead: #{@json_content}"
raise NotAPactError
end
diff --git a/spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb b/spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb
index 611a02465..cbff5da6c 100644
--- a/spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb
+++ b/spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb
@@ -94,8 +94,7 @@ module Renderers
end
it "logs a warning" do
- allow(logger).to receive(:warn).with(/Error/)
- expect(logger).to receive(:warn).with(/Could not parse/)
+ expect(logger).to receive(:info).with(/Could not parse.*Error/)
subject
end
end