mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 02:00:10 +02:00
Pass object with err field to logger instead of passing OError class instance.
GitOrigin-RevId: 7944ba970f0b9867cfed431ae1fb7e15145c7ba7
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
const logger = require('@overleaf/logger')
|
||||
const OError = require('@overleaf/o-error')
|
||||
const crypto = require('crypto')
|
||||
|
||||
const settings = require('@overleaf/settings')
|
||||
@@ -154,10 +153,8 @@ async function _createInvite(subscription, email, inviter) {
|
||||
admin = await SubscriptionLocator.promises.getAdminEmailAndName(
|
||||
subscription._id
|
||||
)
|
||||
} catch (error) {
|
||||
logger.error(
|
||||
OError.tag(error, 'error getting subscription admin email and name')
|
||||
)
|
||||
} catch (err) {
|
||||
logger.error({ err }, 'error getting subscription admin email and name')
|
||||
}
|
||||
|
||||
const user = await UserGetter.promises.getUserByAnyEmail(email)
|
||||
|
||||
Reference in New Issue
Block a user