mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-06-16 06:48:33 +00:00
feat(app): handle unhandled exception & rejection
This commit is contained in:
@ -28,3 +28,11 @@ server.listen(port, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
startWebSocketServer(server);
|
startWebSocketServer(server);
|
||||||
|
|
||||||
|
process.on('uncaughtException', (err, origin) => {
|
||||||
|
logger.error(`Uncaught Exception at ${origin}: ${err}`)
|
||||||
|
})
|
||||||
|
|
||||||
|
process.on('unhandledRejection', (reason, promise) => {
|
||||||
|
logger.error(`Unhandled Rejection at: ${promise}, reason: ${reason}`)
|
||||||
|
})
|
Reference in New Issue
Block a user