Allow error-response to be a handler fn

This is useful whenever you want the error response to depend on the request. In my case, I just need it because I have a whole asset pipeline thing set up through middleware, but I can easily imagine scenarios where I'd want to produce an error page that includes personalized / session-based stuff, just with an error message. It's a small enough tweak that I don't see much risk to this patch, but I'll let you be the judge of that. :smile: