Skip to content

Commit 26d0ac5

Browse files
committed
Add error handling to updateUserGitcoinScores in getUserRemainedCapBasedOnGitcoinScore
1 parent 66d22bc commit 26d0ac5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/services/qAccService.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
GITCOIN_PASSPORT_MIN_VALID_SCORER_SCORE,
1616
} from '../constants/gitcoin';
1717
import { Donation, DONATION_STATUS } from '../entities/donation';
18+
import { logger } from '../utils/logger';
1819
// import { Project } from '../entities/project';
1920

2021
const getEaProjectRoundRecord = async ({
@@ -247,7 +248,11 @@ const getUserRemainedCapBasedOnGitcoinScore = async ({
247248
user.passportScoreUpdateTimestamp.getTime() <
248249
Date.now() - GITCOIN_PASSPORT_EXPIRATION_PERIOD_MS
249250
) {
250-
await updateUserGitcoinScores(user);
251+
try {
252+
await updateUserGitcoinScores(user);
253+
} catch (error) {
254+
logger.error('updateUserGitcoinScores() error', error);
255+
}
251256
}
252257
if (
253258
!user.skipVerification &&

0 commit comments

Comments
 (0)