# How can I fail client replay if the response doesn't match?

**URL:** <https://discourse.mitmproxy.org/t/how-can-i-fail-client-replay-if-the-response-doesnt-match/562>\
**Category:** help\
**Created:** [July 27, 2017, 5:49pm UTC](https://discourse.mitmproxy.org/t/how-can-i-fail-client-replay-if-the-response-doesnt-match/562 "2017-07-27T17:49:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ventajou](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/ventajou/32/172_2.png) [@Ventajou](https://discourse.mitmproxy.org/u/Ventajou)\
**Post date:** [July 27, 2017, 5:49pm UTC](https://discourse.mitmproxy.org/t/how-can-i-fail-client-replay-if-the-response-doesnt-match/562/1 "2017-07-27T17:49:12Z")

</div>

I’d like to use mitmproxy to test a service using a recorded flow. One aspect of that is I’d like to validate that the responses from my service match the recorded responses and in case of a mismatch I’d like to close mitmdump with an error. Is there a way do do that?
