I has problem with error catching in WAI+Warp. Because, as I understand it, all response lives in Iteratee monad. And ofcourse all code is lazy.
<div><br></div><div>I found this gist: <a href="https://gist.github.com/1267589">https://gist.github.com/1267589</a> - it helps to catch non-lazy errors (I just make WAI middleware). But if error occurs in lazy code:</div>

<div><br></div><div>&gt; responseLBS status200 [] undefined</div><div><br></div><div>... all dies. All errors goes to line 14 and Warp sends &quot;200/OK&quot; with empty response instead, for example &#39;500/Internal Server Error&#39;. </div>

<div><br></div><div>How could handle all the errors?</div>