fix: catch global errors
This commit is contained in:
@@ -43,3 +43,11 @@ v1routes(app);
|
|||||||
export type App = typeof app;
|
export type App = typeof app;
|
||||||
|
|
||||||
log`Serving ${app.server?.hostname}:${app.server?.port}`;
|
log`Serving ${app.server?.hostname}:${app.server?.port}`;
|
||||||
|
|
||||||
|
process.on("unhandledRejection", (reason) => {
|
||||||
|
console.error(reason);
|
||||||
|
});
|
||||||
|
|
||||||
|
process.on("uncaughtException", (err) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user