[web-devel] Last call for comments: WAI 0.4

Bas van Dijk v.dijk.bas at gmail.com
Wed Mar 30 18:15:21 CEST 2011

On 30 March 2011 18:01, Michael Snoyman <michael at snoyman.com> wrote:
> On Wed, Mar 30, 2011 at 5:58 PM, Bas van Dijk <v.dijk.bas at gmail.com> wrote:
>> On 28 March 2011 09:02, Michael Snoyman <michael at snoyman.com> wrote:
>>> Just wanted to give everyone a last chance to give input on WAI 0.4
>>> before its release.
>> Hi Michael,
>> What's the role of the errorHandler :: String -> IO () in the Request type:
>> https://github.com/snoyberg/wai/blob/master/Network/Wai.hs#L73 ?
>> It seems a bit odd to have this in a request.
>> Thanks,
>> Bas
> The idea is to allow the server to give the application a general way
> of logging error messages. Frankly, I don't personally use it at all,
> and it was a relic from when I was trying to merge the original WAI
> (proposed by Johan) and Hack. Do people have ideas on how to make it
> more useful, or perhaps a better name for it? This is probably a good
> area for improvement.

Thanks for the explanation. I think it makes more sense to either
remove the error handler or move it to the Application as in:

type Application = ErrorHandler -> Request -> Iteratee B.ByteString IO Response

type ErrorHandler = String -> IO ()


More information about the web-devel mailing list