mirror of
https://github.com/spacebarchat/server.git
synced 2026-11-05 19:49:14 +00:00
Option to make failing route registration fatal
This commit is contained in:
1 parent
5354cfc3c2
commit
963b898c74
1 file changed
+1
@@ -74,6 +74,7 @@ export class Server {
|
||||
const err = new Error(`[Server] Failed to register route ${path}: ${error}`);
|
||||
err.stack = (err.stack ?? "") + "\n Inner exception: " + (<Error>error).stack!.replaceAll("/:", "/index.ts:");
|
||||
console.error(err);
|
||||
if (process.env.ROUTE_REGISTER_FAILURE_IS_FATAL == "true") process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user