Skip to content

Commit ba1f6bc

Browse files
committed
fix: gracefully handle pact webhook status when there is no pact yet
1 parent 2312fa8 commit ba1f6bc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/pact_broker/webhooks/repository.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,11 @@ def delete_triggered_webhooks_by_pact_publication_ids pact_publication_ids
164164
end
165165

166166
def find_latest_triggered_webhooks_for_pact pact
167-
find_latest_triggered_webhooks(pact.consumer, pact.provider)
167+
if pact
168+
find_latest_triggered_webhooks(pact.consumer, pact.provider)
169+
else
170+
[]
171+
end
168172
end
169173

170174
def find_latest_triggered_webhooks consumer, provider

0 commit comments

Comments
 (0)