add ignores for impossible cases

This commit is contained in:
Michael C
2022-09-25 02:04:51 -04:00
parent 9ca087206e
commit 005ae2c9fb
3 changed files with 4 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ export async function getIsUserVIP(req: Request, res: Response): Promise<Respons
hashedUserID: hashedUserID,
vip: vipState,
});
} catch (err) {
} catch (err) /* instanbul ignore next */ {
Logger.error(err as string);
return res.sendStatus(500);
}

View File

@@ -71,7 +71,7 @@ async function dbGetUserSummary(userID: HashedUserID, fetchCategoryStats: boolea
};
}
return result;
} catch (err) {
} catch (err) /* instanbul ignore next */ {
Logger.error(err as string);
return null;
}
@@ -81,7 +81,7 @@ async function dbGetUsername(userID: HashedUserID) {
try {
const row = await db.prepare("get", `SELECT "userName" FROM "userNames" WHERE "userID" = ?`, [userID]);
return row?.userName ?? userID;
} catch (err) {
} catch (err) /* instanbul ignore next */ {
return false;
}
}

View File

@@ -25,7 +25,7 @@ export async function getViewsForUser(req: Request, res: Response): Promise<Resp
} else {
return res.sendStatus(404);
}
} catch (err) {
} catch (err) /* instanbul ignore next */ {
Logger.error(err as string);
return res.sendStatus(500);
}