mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-09 21:17:15 +03:00
add ignores for impossible cases
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user