From b3d2d731360986dd873846faa736ff714230a8ee Mon Sep 17 00:00:00 2001 From: Domagoj Kriskovic Date: Wed, 3 Apr 2024 10:02:13 +0200 Subject: [PATCH] Add externalUserId in ThirdPartyIdentityExistsError info (#17709) * Add externalUserId in ThirdPartyIdentityExistsError info * format fix GitOrigin-RevId: 85370987ff7a9caa54102bf9013ebc655a2d383b --- .../web/app/src/Features/User/ThirdPartyIdentityManager.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/web/app/src/Features/User/ThirdPartyIdentityManager.js b/services/web/app/src/Features/User/ThirdPartyIdentityManager.js index b94be54c6a..ac6d52b559 100644 --- a/services/web/app/src/Features/User/ThirdPartyIdentityManager.js +++ b/services/web/app/src/Features/User/ThirdPartyIdentityManager.js @@ -100,7 +100,11 @@ function link( // projection includes thirdPartyIdentifiers for tests User.findOneAndUpdate(query, update, { new: 1 }, (err, res) => { if (err && err.code === 11000) { - callback(new Errors.ThirdPartyIdentityExistsError()) + callback( + new Errors.ThirdPartyIdentityExistsError({ + info: { externalUserId }, + }) + ) } else if (err != null) { callback(err) } else if (res) {