Skip to content

Commit

Permalink
Range Not satisfiable error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
colloqi committed Feb 29, 2016
1 parent 86689f2 commit b93a481
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ module.exports = function (app) {

// custom error handler
app.use(function (err, req, res, next) {
if (~err.message.indexOf('not found')) return next();
if (err.message.indexOf('not found') >=0) return next();
//ignore range error as well
if (~err.message.indexOf('Requested Range Not Satisfiable')) return res.send();
if (err.message.indexOf('Range Not Satisfiable') >=0 ) return res.send();
console.error(err.stack)
res.status(500).render('500')
})
Expand Down

0 comments on commit b93a481

Please sign in to comment.