mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Add externalUserId in ThirdPartyIdentityExistsError info (#17709)
* Add externalUserId in ThirdPartyIdentityExistsError info * format fix GitOrigin-RevId: 85370987ff7a9caa54102bf9013ebc655a2d383b
This commit is contained in:
committed by
Copybot
parent
92a58c8f3b
commit
b3d2d73136
@@ -100,7 +100,11 @@ function link(
|
|||||||
// projection includes thirdPartyIdentifiers for tests
|
// projection includes thirdPartyIdentifiers for tests
|
||||||
User.findOneAndUpdate(query, update, { new: 1 }, (err, res) => {
|
User.findOneAndUpdate(query, update, { new: 1 }, (err, res) => {
|
||||||
if (err && err.code === 11000) {
|
if (err && err.code === 11000) {
|
||||||
callback(new Errors.ThirdPartyIdentityExistsError())
|
callback(
|
||||||
|
new Errors.ThirdPartyIdentityExistsError({
|
||||||
|
info: { externalUserId },
|
||||||
|
})
|
||||||
|
)
|
||||||
} else if (err != null) {
|
} else if (err != null) {
|
||||||
callback(err)
|
callback(err)
|
||||||
} else if (res) {
|
} else if (res) {
|
||||||
|
|||||||
Reference in New Issue
Block a user