diff --git a/lib/pact_broker/api/resources/webhook_execution.rb b/lib/pact_broker/api/resources/webhook_execution.rb index 07a7d3e49..d7ce1a642 100644 --- a/lib/pact_broker/api/resources/webhook_execution.rb +++ b/lib/pact_broker/api/resources/webhook_execution.rb @@ -16,12 +16,7 @@ def process_post webhook_execution_result = webhook_service.test_execution(webhook, webhook_options) response.headers['Content-Type'] = 'application/hal+json;charset=utf-8' response.body = post_response_body webhook_execution_result - if webhook_execution_result.success? - true - else - response.headers[PactBroker::DO_NOT_ROLLBACK] = 'true' - 500 - end + true end def resource_exists? diff --git a/spec/lib/pact_broker/api/resources/webhook_execution_spec.rb b/spec/lib/pact_broker/api/resources/webhook_execution_spec.rb index 039274a96..9709d12c1 100644 --- a/spec/lib/pact_broker/api/resources/webhook_execution_spec.rb +++ b/spec/lib/pact_broker/api/resources/webhook_execution_spec.rb @@ -75,9 +75,9 @@ module Resources context "when execution is not successful" do let(:success) { false } - it "returns a 500 JSON response" do + it "returns a 200 JSON response" do subject - expect(last_response.status).to eq 500 + expect(last_response.status).to eq 200 end it "includes the execution result JSON in the body" do