@forklaunch/core 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1319,6 +1319,25 @@ var ForklaunchExpressLikeApplication = class extends ForklaunchExpressLikeRouter
1319
1319
  this.postEnrichMiddleware = postEnrichMiddleware;
1320
1320
  this.openTelemetryCollector = openTelemetryCollector;
1321
1321
  this.appOptions = appOptions;
1322
+ process.on("uncaughtException", (err) => {
1323
+ this.openTelemetryCollector.log("error", "Uncaught exception", {
1324
+ err
1325
+ });
1326
+ process.exit(1);
1327
+ });
1328
+ process.on("unhandledRejection", (reason) => {
1329
+ this.openTelemetryCollector.log("error", "Unhandled rejection", {
1330
+ reason
1331
+ });
1332
+ process.exit(1);
1333
+ });
1334
+ process.on("exit", () => {
1335
+ this.openTelemetryCollector.log("info", "Shutting down application");
1336
+ });
1337
+ process.on("SIGINT", () => {
1338
+ this.openTelemetryCollector.log("info", "Shutting down application");
1339
+ process.exit(0);
1340
+ });
1322
1341
  this.internal.use(createContext(this.schemaValidator));
1323
1342
  this.internal.use(cors(this.appOptions?.cors ?? {}));
1324
1343
  }