fix: forgot one
Code Analysis / SonarQube (push) Failing after 20s
Node.js CI / Lint and Test (push) Successful in 49s

This commit is contained in:
2025-09-25 10:53:38 -07:00
parent 10e3a58d6b
commit 31c129da24
2 changed files with 11 additions and 6 deletions
+9 -4
View File
@@ -4,7 +4,7 @@
* @author Naomi Carrigan
*/
import { sendDiscord } from "../modules/discord.js";
import { pipeLog } from "../modules/pipeLog.js";
import { sendMail } from "../modules/sendMail.js";
/**
@@ -17,9 +17,10 @@ export const errorHandler = async(
context: string,
): Promise<void> => {
if (error instanceof Error) {
await sendDiscord(
await pipeLog(
"Rosalia Nightsong",
`[ERROR] ${context}: ${error.message}`,
JSON.stringify(error, null, 2),
"error",
);
await sendMail(
`[ERROR] ${context}: ${error.message}`,
@@ -27,6 +28,10 @@ export const errorHandler = async(
);
return;
}
await sendDiscord(`[ERROR] ${context}`, JSON.stringify(error, null, 2));
await pipeLog(
"Rosalia Nightsong",
`[ERROR] ${context}: ${JSON.stringify(error)}`,
"error",
);
await sendMail(`[ERROR] ${context}`, JSON.stringify(error, null, 2));
};