adds unhandled promise rejection listener just in case
This commit is contained in:
parent
a7514e594d
commit
7126fb6c6c
|
@ -14,6 +14,19 @@ import { start as startRequestQueue } from "./proxy/queue";
|
||||||
|
|
||||||
const PORT = config.port;
|
const PORT = config.port;
|
||||||
|
|
||||||
|
process.on("uncaughtException", (err: any) => {
|
||||||
|
logger.error(
|
||||||
|
{ err, stack: err?.stack },
|
||||||
|
"UNCAUGHT EXCEPTION. Please report this error trace."
|
||||||
|
);
|
||||||
|
});
|
||||||
|
process.on("unhandledRejection", (err: any) => {
|
||||||
|
logger.error(
|
||||||
|
{ err, stack: err?.stack },
|
||||||
|
"UNCAUGHT PROMISE REJECTION. Please report this error trace."
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
// middleware
|
// middleware
|
||||||
app.use("/", rewriteTavernRequests);
|
app.use("/", rewriteTavernRequests);
|
||||||
|
|
Loading…
Reference in New Issue