Add try catch to PBS/CDK and main.

This commit is contained in:
Patrick Fic
2024-09-27 09:18:20 -07:00
parent 544d4b8136
commit e615c4a55b
3 changed files with 42 additions and 27 deletions

View File

@@ -211,4 +211,11 @@ const main = async () => {
};
// Start server
main();
try {
main();
} catch (error) {
logger.log(`Main-API-Error: Something was not caught in the application.`, "error", "api", null, {
error: error.message,
errorjson: JSON.stringify(error)
});
}