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
+2 -2
View File
@@ -331,7 +331,7 @@ export const instantiateServer = async(): Promise<void> => {
server.listen({ port: 5003 }, (error) => {
// eslint-disable-next-line max-lines -- This block is long because of logging.
const application = "Alert Server";
const application = "Rosalia Nightsong";
if (error) {
const { message, stack } = error;
const context = "Server Startup";
@@ -348,7 +348,7 @@ export const instantiateServer = async(): Promise<void> => {
void pipeLog(application, message, level);
});
} catch (error) {
const application = "Alert Server";
const application = "Rosalia Nightsong";
const context = "Server Startup";
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Totally being lazy.
const { message, stack } = error as Error;
+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));
};