cjstehno / ersatz

🤖 A simulated HTTP server for testing client code with configurable responses.
https://cjstehno.github.io/ersatz
Apache License 2.0
47 stars 5 forks source link

Missing encoder/decoder should be more clear #162

Closed cjstehno closed 2 years ago

cjstehno commented 2 years ago

If you create a test that uses a content-type without a decoder, the mismatch report it not clear that the issue is actually a missing encoder/decoder.

The error match-error reporting should provide information about the encoders and decoders configured - or at least whether there is one for the content types involved in the request and response.

cjstehno commented 2 years ago

I added some detail information in the logs (WARN and ERROR) related to missing encoders and decoders so at least if the test fails you can look at the logs and see what may have caused it. The better reporting system (#163) will provide a better framework for stuff like this.