mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: error logger catchall
This commit is contained in:
parent
589d9f1af7
commit
d58214cedd
@ -197,12 +197,6 @@ export default async function getApp(
|
||||
services.openApiService.useErrorHandler(app);
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
app.use(errorHandler());
|
||||
} else {
|
||||
app.use(catchAllErrorHandler(config.getLogger));
|
||||
}
|
||||
|
||||
app.get(`${baseUriPath}`, (req, res) => {
|
||||
res.set('Content-Type', 'text/html');
|
||||
res.send(indexHTML);
|
||||
@ -229,5 +223,11 @@ export default async function getApp(
|
||||
res.send(indexHTML);
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
app.use(errorHandler());
|
||||
} else {
|
||||
app.use(catchAllErrorHandler(config.getLogger));
|
||||
}
|
||||
|
||||
return app;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user