Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve response body validation error message #98

Open
ThomasKoppensteiner opened this issue Apr 18, 2023 · 1 comment
Open

Improve response body validation error message #98

ThomasKoppensteiner opened this issue Apr 18, 2023 · 1 comment

Comments

@ThomasKoppensteiner
Copy link

Pactflow prints the following error message, in case the response body doesn't match the expected response body:

Response body is incompatible with the response body schema in the spec file: should be object

For me it wasn't clear WHAT/which part of the response "should be (a) object".

After figuring out, that the response body was a JSON-String, instead of a JSON-Object, in the pact the following error message would have been more helpful for me:

"Response body is incompatible with the response body schema in the spec file: The response body should be a JSON object, but is as JSON string"

For more details please have a look at this Pactflow slack thread.

@mefellows
Copy link
Contributor

Thanks Thomas. We have added this for review in the current BDCT implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants