mirror of https://github.com/calzoneman/sync.git
Fix unhandled rejection
This commit is contained in:
parent
c6c3bafca2
commit
99076412b6
|
@ -19,12 +19,16 @@ export default function initialize(app, session) {
|
||||||
|
|
||||||
let rank;
|
let rank;
|
||||||
if (!global_rank) {
|
if (!global_rank) {
|
||||||
rank = await backfillRankIntoAuthCookie(
|
try {
|
||||||
session,
|
rank = await backfillRankIntoAuthCookie(
|
||||||
new Date(parseInt(expiration, 10)),
|
session,
|
||||||
req,
|
new Date(parseInt(expiration, 10)),
|
||||||
res
|
req,
|
||||||
);
|
res
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
return next();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
rank = parseInt(global_rank, 10);
|
rank = parseInt(global_rank, 10);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue