[web-devel] Error catching in WAI and Warp

Alexander Dorofeev aka.spin at gmail.com
Thu Dec 15 23:22:22 CET 2011

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.

I found this gist: https://gist.github.com/1267589 - it helps to catch
non-lazy errors (I just make WAI middleware). But if error occurs in lazy

> responseLBS status200 [] undefined

... all dies. All errors goes to line 14 and Warp sends "200/OK" with empty
response instead, for example '500/Internal Server Error'.

How could handle all the errors?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20111216/04a27f4e/attachment.htm>

More information about the web-devel mailing list