|
@@ -105,11 +105,13 @@ module.exports = function(crowi, app) {
|
|
|
});
|
|
});
|
|
|
})
|
|
})
|
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
|
- debug('findOrRegister error: ', err);
|
|
|
|
|
if (err.name != null && err.name === 'DuplicatedUsernameException') {
|
|
if (err.name != null && err.name === 'DuplicatedUsernameException') {
|
|
|
req.flash('isDuplicatedUsernameExceptionOccured', true);
|
|
req.flash('isDuplicatedUsernameExceptionOccured', true);
|
|
|
return next();
|
|
return next();
|
|
|
}
|
|
}
|
|
|
|
|
+ else {
|
|
|
|
|
+ return next(err);
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
})(req, res, next);
|
|
})(req, res, next);
|