mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Propagate the error further up the stack
Useful for error reporting and metrics.
This commit is contained in:
parent
8a317b5bfe
commit
16cb5e0d35
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ module.exports =
|
|||
licenceName: licence.name
|
||||
has_personal_subscription: subscription?
|
||||
|
||||
createInvite: (req, res)->
|
||||
createInvite: (req, res, next)->
|
||||
user = AuthenticationController.getSessionUser(req)
|
||||
licence = SubscriptionDomainHandler.getLicenceUserCanJoin(user)
|
||||
|
||||
|
@ -42,6 +42,6 @@ module.exports =
|
|||
|
||||
TeamInvitesHandler.createDomainInvite user, licence, (err) ->
|
||||
if err?
|
||||
res.sendStatus 500
|
||||
next(err)
|
||||
else
|
||||
res.sendStatus 200
|
||||
|
|
Loading…
Reference in a new issue