Skip to content

Commit

Permalink
GAWD DEM BRAKTS
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeballcode committed Jan 1, 2016
1 parent f8cfabd commit 44b8d3b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ app.use(function (req, res, next) {
if (app.get('env') === 'development') {
app.use(function (err, req, res, next) {
res.status(err.status || 500);
console.log((res.userAgent.indexOf('mobile') === -1 ? 'computer' : 'mobile') + '/errors/error' + err.status || 500);
res.render((res.userAgent.indexOf('mobile') === -1 ? 'computer' : 'mobile') + '/errors/error' + err.status || 500, {
res.render((res.userAgent.indexOf('mobile') === -1 ? 'computer' : 'mobile') + '/errors/error' + (err.status || 500), {
message: err.message,
error: err
});
Expand All @@ -160,7 +159,7 @@ if (app.get('env') === 'development') {
// no stacktraces leaked to user
app.use(function (err, req, res, next) {
res.status(err.status || 500);
res.render((res.userAgent.indexOf('mobile') === -1 ? 'computer' : 'mobile') + '/errors/error' + err.status || 500, {
res.render((res.userAgent.indexOf('mobile') === -1 ? 'computer' : 'mobile') + '/errors/error' + (err.status || 500), {
message: err.message,
error: {}
});
Expand Down

0 comments on commit 44b8d3b

Please sign in to comment.