diff --git a/src/controllers/api/focusController.ts b/src/controllers/api/focusController.ts index 9d205fd7..268b53ba 100644 --- a/src/controllers/api/focusController.ts +++ b/src/controllers/api/focusController.ts @@ -9,7 +9,7 @@ export const focusController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); switch (req.query.op) { default: - logger.error("Unhandled focus op type: " + req.query.op); + logger.error("Unhandled focus op type: " + String(req.query.op)); logger.debug(String(req.body)); res.end(); break; diff --git a/src/controllers/api/gildWeaponController.ts b/src/controllers/api/gildWeaponController.ts index 2855893f..319da457 100644 --- a/src/controllers/api/gildWeaponController.ts +++ b/src/controllers/api/gildWeaponController.ts @@ -29,17 +29,17 @@ export const gildWeaponController: RequestHandler = async (req, res) => { const data = getJSONfromString(String(req.body)) as IGildWeaponRequest; data.ItemId = String(req.query.ItemId); if (!modularWeaponCategory.includes(req.query.Category as WeaponTypeInternal | "Hoverboards")) { - throw new Error(`Unknown modular weapon Category: ${req.query.Category}`); + throw new Error(`Unknown modular weapon Category: ${String(req.query.Category)}`); } data.Category = req.query.Category as WeaponTypeInternal | "Hoverboards"; const inventory = await getInventory(accountId); if (!inventory[data.Category]) { - throw new Error(`Category ${req.query.Category} not found in inventory`); + throw new Error(`Category ${String(req.query.Category)} not found in inventory`); } const weaponIndex = inventory[data.Category].findIndex(x => String(x._id) === data.ItemId); if (weaponIndex === -1) { - throw new Error(`Weapon with ${data.ItemId} not found in category ${req.query.Category}`); + throw new Error(`Weapon with ${data.ItemId} not found in category ${String(req.query.Category)}`); } const weapon = inventory[data.Category][weaponIndex]; diff --git a/src/controllers/api/infestedFoundryController.ts b/src/controllers/api/infestedFoundryController.ts index f58fafc0..bc8e30a3 100644 --- a/src/controllers/api/infestedFoundryController.ts +++ b/src/controllers/api/infestedFoundryController.ts @@ -111,7 +111,7 @@ export const infestedFoundryController: RequestHandler = async (req, res) => { break; default: - throw new Error(`unhandled infestedFoundry mode: ${req.query.mode}`); + throw new Error(`unhandled infestedFoundry mode: ${String(req.query.mode)}`); } };