 		email   = req.body.email
 
 		TeamInvitesHandler.createInvite teamManagerId, email, (err, invite) ->
-			next(err) if err?
+			return handleError(err, req, res, next) if err?
 			inviteView = { user:
 				{ email: invite.email, sentAt: invite.sentAt, holdingAccount: true }
 			}

					hasPersonalSubscription: personalSubscription?
					appName: settings.appName


	acceptInvite: (req, res, next) ->
		token = req.params.token
		userId = AuthenticationController.getLoggedInUserId(req)

		TeamInvitesHandler.acceptInvite token, userId, (err, results) ->
			next(err) if err?

		res.sendStatus 204


		userId = AuthenticationController.getLoggedInUserId(req)

		TeamInvitesHandler.getInvite token, (err, invite, teamSubscription) ->
			return handleError(err, req, res, next) if err?

			if !invite
				return ErrorController.notFound(req, res, next)

			SubscriptionLocator.getUsersSubscription userId, (err, personalSubscription) ->
				return handleError(err, req, res, next) if err?

				res.render "subscriptions/team/invite",
					inviterName: invite.inviterName
