mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-22 01:16:07 +02: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);
|
services.openApiService.useErrorHandler(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.NODE_ENV !== 'production') {
|
|
||||||
app.use(errorHandler());
|
|
||||||
} else {
|
|
||||||
app.use(catchAllErrorHandler(config.getLogger));
|
|
||||||
}
|
|
||||||
|
|
||||||
app.get(`${baseUriPath}`, (req, res) => {
|
app.get(`${baseUriPath}`, (req, res) => {
|
||||||
res.set('Content-Type', 'text/html');
|
res.set('Content-Type', 'text/html');
|
||||||
res.send(indexHTML);
|
res.send(indexHTML);
|
||||||
@ -229,5 +223,11 @@ export default async function getApp(
|
|||||||
res.send(indexHTML);
|
res.send(indexHTML);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
|
app.use(errorHandler());
|
||||||
|
} else {
|
||||||
|
app.use(catchAllErrorHandler(config.getLogger));
|
||||||
|
}
|
||||||
|
|
||||||
return app;
|
return app;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user