mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
Add externalUserId in ThirdPartyIdentityExistsError info (#17709)
* Add externalUserId in ThirdPartyIdentityExistsError info * format fix GitOrigin-RevId: 85370987ff7a9caa54102bf9013ebc655a2d383b
This commit is contained in:
parent
92a58c8f3b
commit
b3d2d73136
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue