<#1052 Return Verification Errors in VerificationE...
# pact-js-development
g
#1052 Return Verification Errors in VerificationError object Issue created by lon-io Feature description Currently, verification errors are only implicitly logged to console, meaning I cannot access them programmatically after the tests have been run. Use case Consider a verification flow like in the example below, where I run my verification behind a HTTP method. I would like to return the errors to the client calling the HTTP endpoint, for example, from
error.data
in the catch block, where error is likely an instance of
VerificationError
Copy code
const verifier = new Verifier(options);

try {
  await verifier.verifyProvider();

  res.send('successful verification');
} catch (error) {
  const errors = error?.data;

  res.send(errors);
}
pact-foundation/pact-js