This commit is contained in:
Christopher Cookman 2024-08-11 22:01:03 -06:00
parent 6a5fbf3790
commit dea0915d9b
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -1664,11 +1664,11 @@ dcClient.on('interactionCreate', async interaction => {
// Lets actually handle exceptions now
process.on('unhandledRejection', (error) => {
// Log a full error with line number
sendLog(`${colors.red("[ERROR]")} ${error.stack}`);
sendLog(`${colors.red("[ERROR]")} ${JSON.stringify(error)}`);
// If config.ntfyUrl is set, Send the exception to ntfy
if (config.ntfyUrl) fetch(config.ntfyUrl, {
method: 'POST', // PUT works too
body: error.stack,
body: JSON.stringify(error),
headers: {
'Title': 'FreePBX Bot Rejection',
'Priority': 5,