log request body for unhandled operations
All checks were successful
Build / build (18) (push) Successful in 44s
Build / build (20) (push) Successful in 1m9s
Build / build (22) (push) Successful in 1m4s
Build / build (18) (pull_request) Successful in 44s
Build / build (20) (pull_request) Successful in 1m7s
Build / build (22) (pull_request) Successful in 1m5s

This commit is contained in:
Sainan 2025-03-18 11:06:41 +01:00
parent 2af671223e
commit a1a208844a
3 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,7 @@ import { config } from "@/src/services/configService";
import { GuildPermission, ITechProjectClient, ITechProjectDatabase } from "@/src/types/guildTypes"; import { GuildPermission, ITechProjectClient, ITechProjectDatabase } from "@/src/types/guildTypes";
import { TGuildDatabaseDocument } from "@/src/models/guildModel"; import { TGuildDatabaseDocument } from "@/src/models/guildModel";
import { toMongoDate } from "@/src/helpers/inventoryHelpers"; import { toMongoDate } from "@/src/helpers/inventoryHelpers";
import { logger } from "@/src/utils/logger";
export const guildTechController: RequestHandler = async (req, res) => { export const guildTechController: RequestHandler = async (req, res) => {
const accountId = await getAccountIdForRequest(req); const accountId = await getAccountIdForRequest(req);
@ -219,6 +220,7 @@ export const guildTechController: RequestHandler = async (req, res) => {
await guild.save(); await guild.save();
res.end(); res.end();
} else { } else {
logger.debug(`data provided to ${req.path}: ${String(req.body)}`);
throw new Error(`unknown guildTech action: ${data.Action}`); throw new Error(`unknown guildTech action: ${data.Action}`);
} }
}; };

View File

@ -357,6 +357,7 @@ export const infestedFoundryController: RequestHandler = async (req, res) => {
} }
default: default:
logger.debug(`data provided to ${req.path}: ${String(req.body)}`);
throw new Error(`unhandled infestedFoundry mode: ${String(req.query.mode)}`); throw new Error(`unhandled infestedFoundry mode: ${String(req.query.mode)}`);
} }
}; };

View File

@ -4,6 +4,7 @@ import { getAccountIdForRequest } from "@/src/services/loginService";
import { SRng } from "@/src/services/rngService"; import { SRng } from "@/src/services/rngService";
import { IMongoDate } from "@/src/types/commonTypes"; import { IMongoDate } from "@/src/types/commonTypes";
import { IInfNode } from "@/src/types/inventoryTypes/inventoryTypes"; import { IInfNode } from "@/src/types/inventoryTypes/inventoryTypes";
import { logger } from "@/src/utils/logger";
import { RequestHandler } from "express"; import { RequestHandler } from "express";
import { ExportRegions } from "warframe-public-export-plus"; import { ExportRegions } from "warframe-public-export-plus";
@ -82,6 +83,7 @@ export const nemesisController: RequestHandler = async (req, res) => {
target: inventory.toJSON().Nemesis target: inventory.toJSON().Nemesis
}); });
} else { } else {
logger.debug(`data provided to ${req.path}: ${String(req.body)}`);
throw new Error(`unknown nemesis mode: ${String(req.query.mode)}`); throw new Error(`unknown nemesis mode: ${String(req.query.mode)}`);
} }
}; };