فهرست منبع

change to ErrorV3

Yohei-Shiina 3 سال پیش
والد
کامیت
15126736cf
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      packages/app/src/server/routes/login-passport.js

+ 2 - 2
packages/app/src/server/routes/login-passport.js

@@ -135,7 +135,7 @@ module.exports = function(crowi, app) {
 
 
   const cannotLoginErrorHadnler = (req, res, next) => {
   const cannotLoginErrorHadnler = (req, res, next) => {
     // this is called when all login method is somehow failed without invoking 'return next(<any Error>)'
     // this is called when all login method is somehow failed without invoking 'return next(<any Error>)'
-    const err = Error('message.sign_in_failure');
+    const err = new ErrorV3('message.sign_in_failure');
     return next(err);
     return next(err);
   };
   };
 
 
@@ -233,7 +233,7 @@ module.exports = function(crowi, app) {
 
 
     // just in case the returned value is null or undefined
     // just in case the returned value is null or undefined
     if (externalAccount == null) {
     if (externalAccount == null) {
-      return next(Error('message.external_account_not_exist'));
+      return next(new ErrorV3('message.external_account_not_exist'));
     }
     }
 
 
     const user = await externalAccount.getPopulatedUser();
     const user = await externalAccount.getPopulatedUser();