diff --git a/index.js b/index.js index 53ce62b..6acc8e5 100644 --- a/index.js +++ b/index.js @@ -147,6 +147,11 @@ app.post('/api/upload', [ cors(corsOptions) ], (req, res) => { }); }); +app.use(function (err, req, res, next) { + console.error(err.stack); + res.status(500).send('Internal Server Error: Something went wrong'); +}); + app.listen(config.server.port, () => { console.log(`Started server on port ${config.server.port}`); }); \ No newline at end of file