Skip to content

Commit 005ae2c

Browse files
committed
add ignores for impossible cases
1 parent 9ca0872 commit 005ae2c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/routes/getIsUserVIP.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export async function getIsUserVIP(req: Request, res: Response): Promise<Respons
2121
hashedUserID: hashedUserID,
2222
vip: vipState,
2323
});
24-
} catch (err) {
24+
} catch (err) /* instanbul ignore next */ {
2525
Logger.error(err as string);
2626
return res.sendStatus(500);
2727
}

src/routes/getUserStats.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async function dbGetUserSummary(userID: HashedUserID, fetchCategoryStats: boolea
7171
};
7272
}
7373
return result;
74-
} catch (err) {
74+
} catch (err) /* instanbul ignore next */ {
7575
Logger.error(err as string);
7676
return null;
7777
}
@@ -81,7 +81,7 @@ async function dbGetUsername(userID: HashedUserID) {
8181
try {
8282
const row = await db.prepare("get", `SELECT "userName" FROM "userNames" WHERE "userID" = ?`, [userID]);
8383
return row?.userName ?? userID;
84-
} catch (err) {
84+
} catch (err) /* instanbul ignore next */ {
8585
return false;
8686
}
8787
}

src/routes/getViewsForUser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export async function getViewsForUser(req: Request, res: Response): Promise<Resp
2525
} else {
2626
return res.sendStatus(404);
2727
}
28-
} catch (err) {
28+
} catch (err) /* instanbul ignore next */ {
2929
Logger.error(err as string);
3030
return res.sendStatus(500);
3131
}

0 commit comments

Comments
 (0)