From b2b1de7254a9729da12e05aecd6610be4758bdc1 Mon Sep 17 00:00:00 2001 From: Michael Vito Moschovas Date: Wed, 24 Jan 2024 14:21:49 -0500 Subject: [PATCH] adds a catch to greedy promise in user id module. Errors that occur currently throw an Uncaught promise error on page --- modules/userId/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/userId/index.js b/modules/userId/index.js index 5a088b27319..40e4a6bd3db 100644 --- a/modules/userId/index.js +++ b/modules/userId/index.js @@ -488,6 +488,7 @@ function idSystemInitializer({delay = GreedyPromise.timeout} = {}) { } cancel = defer(); return GreedyPromise.race([promise, cancel.promise]) + .catch(() => logWarn(`${MODULE_NAME} - cancelled promise`)) .finally(initMetrics.startTiming('userId.total')) }