Hey, Having some trouble publishing pact verifica...
# pactflow
e
Hey, Having some trouble publishing pact verification results.
Copy code
Publishing of verification results failed with an error: Link/Resource was not found - Request to pact broker path '/pacticipants/xyz.BFF' failed: 404 Not Found. URL: '<https://mycompany.pactflow.io/pacts/provider/xyz.BFF/consumer/prq.SPA/version/a29c9c63b2fc1cae4b8488b322b6fc7b02cd5ca1>'
Code in question looks like this:
Copy code
verifierSource = provider.WithUriSource(_executionConfig.Pact.IncomingWebhook.PactUrl,
    webHookOptions => webHookOptions.TokenAuthentication(_executionConfig.Pact.Broker.Token)
        .PublishResults(optionalProviderVersion.IsSome,
            optionalProviderVersion.Match(v => v, string.Empty),
            options => options
                .WithProviderBranchIfSuppliedAndValid(_executionConfig)
                .WithTeamcityBuildUrlIfSuppliedAndValid(_executionConfig.Teamcity))
);
Q1: Is the
PactUrl
somehow wrong? It's like this currently
<https://mycompany.pactflow.io/pacts/provider/xyz.BFF/consumer/pqr.SPA/version/a29c9c63b2fc1cae4b8488b322b6fc7b02cd5ca1>
Q2: What is the error message (
Link/Resource was not found
) telling me? Q3: How do I arrange for this to throw an exception if publishing results fails rather than just logging this error?
m
I’m wondering if perhaps it’s the full stop in the URL? (It should be supported, but that’s one thing that jumps out at me)
I’m not quite following the
webHookOptions
though and the
WithProviderBranchIfSuppliedAndValid
things - these don’t look part of the Pact .NET API. Is this some internal wrapper?
If you can, please provide DEBUG level logs so we can take a look see