diff --git a/functions/src/update-contract-metrics.ts b/functions/src/update-contract-metrics.ts index 4825db4f..51c420ad 100644 --- a/functions/src/update-contract-metrics.ts +++ b/functions/src/update-contract-metrics.ts @@ -39,9 +39,13 @@ export const updateContractMetrics = functions.pubsub ) for (const [userId, score] of Object.entries(userScores)) { - await firestore.collection('users').doc(userId).update({ - totalPnLCached: score, - }) + await firestore + .collection('users') + .doc(userId) + .update({ + totalPnLCached: score, + }) + .catch((e) => console.log('failed to update user', userId, e)) } })