Fix unhandled rejection

This commit is contained in:
Calvin Montgomery 2017-08-14 20:31:45 -07:00
parent c6c3bafca2
commit 99076412b6

View file

@ -19,12 +19,16 @@ export default function initialize(app, session) {
let rank; let rank;
if (!global_rank) { if (!global_rank) {
try {
rank = await backfillRankIntoAuthCookie( rank = await backfillRankIntoAuthCookie(
session, session,
new Date(parseInt(expiration, 10)), new Date(parseInt(expiration, 10)),
req, req,
res res
); );
} catch (error) {
return next();
}
} else { } else {
rank = parseInt(global_rank, 10); rank = parseInt(global_rank, 10);
} }