Skip to content

Commit 9322910

Browse files
committed
feat: change pact rendering log message from warn to info
1 parent 82b830c commit 9322910

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/pact_broker/api/renderers/html_pact_renderer.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ def html
159159
def consumer_contract
160160
Pact::ConsumerContract.from_json(@json_content)
161161
rescue => e
162-
logger.warn "#{e.class} #{e.message} #{e.backtrace.join("\n")}"
163-
logger.warn "Could not parse the following content to a Pact, showing raw content instead: #{@json_content}"
162+
logger.info "Could not parse the following content to a Pact due to #{e.class} #{e.message}, showing raw content instead: #{@json_content}"
164163
raise NotAPactError
165164
end
166165

spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ module Renderers
9494
end
9595

9696
it "logs a warning" do
97-
allow(logger).to receive(:warn).with(/Error/)
98-
expect(logger).to receive(:warn).with(/Could not parse/)
97+
expect(logger).to receive(:info).with(/Could not parse.*Error/)
9998
subject
10099
end
101100
end

0 commit comments

Comments
 (0)