You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the error messages when a consumer test fails to match the expectations are not very detailled. Many users don't realise they can look in the log to get more detailed errors.
We should improve this behaviour - at a minimum, we could add an error message directing users to the log file.
Ideally, we'd have a detailed copy of the failure that could be logged. For pacts generated with the ruby binaries (the current master release of pact-js uses pact-node's ruby binaries), we could improve the mock service to return detailed information: pact-foundation/pact-mock_service#123
The text was updated successfully, but these errors were encountered:
Doesn't the js show the output that says "look at this log file? though"
Pact::MockService::VerificationFailedError:
Actual interactions do not match expected interactions for mock Bar.
Missing requests:
GET /thing2
Unexpected requests:
GET /thing
See log/bar_mock_service.log for details.
Here's an example failure from the e2e example in the repo:
One option would be to return structured error data + messages in the verification call, which can then be logged using the native JS (or whatever client's) log framework.
EDIT: the provider side log file is not logged to the console, so that would be an improvement on that side of things (I also didn't know it existed for a long time)
Issue Classification
Feature Request
Currently, the error messages when a consumer test fails to match the expectations are not very detailled. Many users don't realise they can look in the log to get more detailed errors.
We should improve this behaviour - at a minimum, we could add an error message directing users to the log file.
Ideally, we'd have a detailed copy of the failure that could be logged. For pacts generated with the ruby binaries (the current master release of pact-js uses pact-node's ruby binaries), we could improve the mock service to return detailed information: pact-foundation/pact-mock_service#123
The text was updated successfully, but these errors were encountered: