Skip to content

Commit

Permalink
Add error catching (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Brady authored and gibfahn committed Jun 5, 2017
1 parent 746b8c5 commit c026425
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,9 @@ app.use('/', mds.middleware({
rootDirectory: path.resolve(__dirname, ''),
view: 'layout'
}));

// eslint-disable-next-line no-unused-vars
app.use(function (err, req, res, next) {
console.error(err.stack)
res.status(500).send('Error - please try again or raise an issue at https://github.com/AdoptOpenJDK/openjdk-api/issues.')
});

0 comments on commit c026425

Please sign in to comment.