Skip to content

Commit

Permalink
feat: change webhook execution failure log to info
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Feb 21, 2019
1 parent 944adc8 commit 7238bc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/pact_broker/domain/webhook_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def log_completion_message success
end

def log_error e
logger.error "Error executing webhook #{uuid} #{e.class.name} - #{e.message} #{e.backtrace.join("\n")}"
logger.info "Error executing webhook #{uuid} #{e.class.name} - #{e.message} #{e.backtrace.join("\n")}"

if options[:show_response]
execution_logger.error "Error executing webhook #{uuid} #{e.class.name} - #{e.message}"
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/pact_broker/domain/webhook_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ class WebhookTestError < StandardError; end
end

it "logs the error" do
expect(logger).to receive(:error).with(/Error.*WebhookTestError.*blah/)
expect(logger).to receive(:info).with(/Error.*WebhookTestError.*blah/)
execute
end

Expand Down

0 comments on commit 7238bc4

Please sign in to comment.