From c8a8194ee62864d28c056f5300c126f3257c687a Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Fri, 24 May 2019 11:19:20 +1000 Subject: [PATCH] feat(webhooks): do not show backtrace in webhook test execution response --- .../api/decorators/webhook_execution_result_decorator.rb | 1 - spec/features/execute_webhook_spec.rb | 4 ++-- .../api/decorators/webhook_execution_result_decorator_spec.rb | 4 ---- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/pact_broker/api/decorators/webhook_execution_result_decorator.rb b/lib/pact_broker/api/decorators/webhook_execution_result_decorator.rb index 4e82b5674..ac29bef76 100644 --- a/lib/pact_broker/api/decorators/webhook_execution_result_decorator.rb +++ b/lib/pact_broker/api/decorators/webhook_execution_result_decorator.rb @@ -8,7 +8,6 @@ module Decorators class WebhookExecutionResultDecorator < BaseDecorator class ErrorDecorator < BaseDecorator property :message - property :backtrace end class HTTPRequestDecorator < BaseDecorator diff --git a/spec/features/execute_webhook_spec.rb b/spec/features/execute_webhook_spec.rb index b77740642..7e58591a8 100644 --- a/spec/features/execute_webhook_spec.rb +++ b/spec/features/execute_webhook_spec.rb @@ -82,8 +82,8 @@ subject { post path; last_response } - it "returns a 500 response" do - expect(subject.status).to be 500 + it "returns a 200 response" do + expect(subject.status).to be 200 end it "does not save a TriggeredWebhook" do diff --git a/spec/lib/pact_broker/api/decorators/webhook_execution_result_decorator_spec.rb b/spec/lib/pact_broker/api/decorators/webhook_execution_result_decorator_spec.rb index 5bfb7fda3..82b86d30c 100644 --- a/spec/lib/pact_broker/api/decorators/webhook_execution_result_decorator_spec.rb +++ b/spec/lib/pact_broker/api/decorators/webhook_execution_result_decorator_spec.rb @@ -43,10 +43,6 @@ module Decorators it "includes the message" do expect(subject[:error][:message]).to eq 'message' end - - it "includes the backtrace" do - expect(subject[:error][:backtrace]).to eq ['blah','blah'] - end end context "when there is a request" do