mozilla / persona-yahoo-bridge

A ProxyIdP service for bridging major IdPs who lack support for the BrowserID protocol.
26 stars 15 forks source link

Provide required context and disable layout #242

Closed ozten closed 11 years ago

ozten commented 11 years ago

If one throws a runtime error in a piece of middleware, the error handler setup may not have enough context to actually render.

We should provide safe defaults.

Steps to reproduce:

In bigtent add a peice of middleware before any of the others such as

app.use(function(req, res, next) { asdf; });

Before this patch - You'll get a ReferenceError about lang not being defined.

After this patch - A proper error screen.

CC @6a68 @seanmonstar

jaredhirsch commented 11 years ago

Yeah, this is a great feature to add.