Adds an onFailure callback to delegate error handling to the app
This adds an onFailure hook that can be passed into the fastboot middleware.
The use case is apps may already have a way of handling errors. This allows someone to inject their own handler logic, which could be as simple as next(err) to allow their apps error handler to take over.
Rather than introducing a new callback, I think (in the interests of Express ecosystem consistency) we should consider copying the fallthrough API from express.static().
Sounds great, what should I default to?
static() defaults to true, but I think that probably gets used standalone less than FastBoot. false would preserve our current semantics, which IMO are correct, but I'm open to hearing from others who disagree.
we can probably close this now that #11 is merged.
I believe what I'm after is slightly different, I want to delegate error handling entirely to the caller.
In #11 it looks like it res.send with html in some cases which might conflict with whatever the error handler is doing.