File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ const authModel = require('../models/auth');
5
5
const helpers = require ( '../lib/helpers' ) ;
6
6
const TokenModel = require ( '../models/token' ) ;
7
7
8
+ const ERROR_MESSAGE_INVALID_AUTH = 'Invalid email or password' ;
9
+
8
10
module . exports = {
9
11
10
12
/**
@@ -69,15 +71,15 @@ module.exports = {
69
71
} ;
70
72
} ) ;
71
73
} else {
72
- throw new error . AuthError ( 'Invalid password' ) ;
74
+ throw new error . AuthError ( ERROR_MESSAGE_INVALID_AUTH ) ;
73
75
}
74
76
} ) ;
75
77
} else {
76
- throw new error . AuthError ( 'No password auth for user' ) ;
78
+ throw new error . AuthError ( ERROR_MESSAGE_INVALID_AUTH ) ;
77
79
}
78
80
} ) ;
79
81
} else {
80
- throw new error . AuthError ( 'No relevant user found' ) ;
82
+ throw new error . AuthError ( ERROR_MESSAGE_INVALID_AUTH ) ;
81
83
}
82
84
} ) ;
83
85
} ,
You can’t perform that action at this time.
0 commit comments