Skip to content

Commit c026425

Browse files
Joe Bradygibfahn
Joe Brady
authored andcommitted
Add error catching (#29)
1 parent 746b8c5 commit c026425

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: server.js

+6
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,9 @@ app.use('/', mds.middleware({
4949
rootDirectory: path.resolve(__dirname, ''),
5050
view: 'layout'
5151
}));
52+
53+
// eslint-disable-next-line no-unused-vars
54+
app.use(function (err, req, res, next) {
55+
console.error(err.stack)
56+
res.status(500).send('Error - please try again or raise an issue at https://github.com/AdoptOpenJDK/openjdk-api/issues.')
57+
});

0 commit comments

Comments
 (0)