process should exit on unhandled exception

This commit is contained in:
SPRINX0\prochazka
2024-10-15 10:05:18 +02:00
parent b631519009
commit f40db68579

View File

@@ -10,10 +10,7 @@ const logger = getLogger('apiIndex');
process.on('uncaughtException', err => {
logger.fatal(extractErrorLogData(err), 'Uncaught exception');
if (err?.['code'] == 'EPIPE' && platformInfo.isForkedApi) {
// stop subprocess on EPIPE errors
process.exit(0);
}
process.exit(1);
});
if (processArgs.startProcess) {