# How can I fail server replay if the requests do not match?

**URL:** <https://discourse.mitmproxy.org/t/how-can-i-fail-server-replay-if-the-requests-do-not-match/563>\
**Category:** help\
**Created:** [July 27, 2017, 5:56pm UTC](https://discourse.mitmproxy.org/t/how-can-i-fail-server-replay-if-the-requests-do-not-match/563 "2017-07-27T17:56:34Z")\
**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:56pm UTC](https://discourse.mitmproxy.org/t/how-can-i-fail-server-replay-if-the-requests-do-not-match/563/1 "2017-07-27T17:56:35Z")

</div>

Hi,

I’m looking to use recorded flow to mock a service on a CI server, so I’d like to run mitmdump in server replay mode. How can I get mitmdump to fail and return an error in the following scenarios?

- a request comes in the wrong order
- an unexpected request is received
- no more requests come but the recording still has some left to respond to (timeout)

Thanks!
