fix: wrong error message

This commit is contained in:
Sainan 2024-12-23 06:41:09 +01:00
parent 918e33f126
commit 39ac1d8276

View File

@ -23,8 +23,8 @@ export const getShip = async (shipId: Types.ObjectId, fieldSelection: string = "
const ship = await Ship.findOne({ _id: shipId }, fieldSelection);
if (!ship) {
logger.error(`error finding a ship for account ${shipId}`);
throw new Error(`error finding a ship for account ${shipId}`);
logger.error(`error finding a ship with id ${shipId}`);
throw new Error(`error finding a ship with id ${shipId}`);
}
return ship;