From 65822cd7c3acc4a12113e2acdf3e4ddba32ed7f6 Mon Sep 17 00:00:00 2001 From: Matt Fellows Date: Fri, 9 Oct 2020 23:59:37 +1100 Subject: [PATCH] fix: misleading error message in certain verification scenarios --- dsl/pact.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dsl/pact.go b/dsl/pact.go index b1538c78f..3e45280f5 100644 --- a/dsl/pact.go +++ b/dsl/pact.go @@ -403,7 +403,10 @@ func (p *Pact) VerifyProvider(t *testing.T, request types.VerifyRequest) ([]type res, err := p.VerifyProviderRaw(request) if len(res) == 0 { - message := "No pacts found to verify" + var message = "no pacts found to verify" + if err != nil { + message = "error verifying the provider: see returned error for detail" + } if len(request.Tags) > 0 { message = fmt.Sprintf("%s. Check the tags provided (%s) for your broker (%s) are correct", message, strings.Join(request.Tags, ","), request.BrokerURL)