mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-22 02:04:31 +00:00
Pass object with err
field to logger instead of passing OError
class instance.
GitOrigin-RevId: 7944ba970f0b9867cfed431ae1fb7e15145c7ba7
This commit is contained in:
parent
be8b7dfa1e
commit
014d08e166
1 changed files with 2 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue