pactflow / roadmap

Public Pactflow issue tracker and roadmap
MIT License
15 stars 0 forks source link

Improve response body validation error message #98

Open ThomasKoppensteiner opened 1 year ago

ThomasKoppensteiner commented 1 year ago

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 commented 1 year ago

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