File tree Expand file tree Collapse file tree
packages/contentstack-auth/src/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,11 +131,9 @@ class AuthHandler {
131131 reject ( error ) ;
132132 }
133133 } else {
134- log . debug ( 'Login failed: no user found.' , { module : 'auth-handler' , error } ) ;
135- reject ( new Error ( messageHandler . parse ( 'CLI_AUTH_LOGIN_NO_USER' ) ) ) ;
136134 log . debug ( 'Login API call failed.' , { module : 'auth-handler' , error : error ?. errorMessage || error } ) ;
137135 cliux . print ( 'CLI_AUTH_LOGIN_FAILED' , { color : 'yellow' } ) ;
138- handleAndLogError ( error , { module : 'auth-handler' } ) ;
136+ reject ( error )
139137 }
140138 } ) ;
141139 } else {
@@ -203,7 +201,7 @@ class AuthHandler {
203201 . catch ( ( error : Error ) => {
204202 log . debug ( 'Token validation failed.' , { module : 'auth-handler' , error : error . message } ) ;
205203 cliux . print ( 'CLI_AUTH_TOKEN_VALIDATION_FAILED' , { color : 'yellow' } ) ;
206- handleAndLogError ( error , { module : 'auth-handler' } ) ;
204+ reject ( error ) ;
207205 } ) ;
208206 } else {
209207 log . debug ( 'Token validation failed: no auth token provided.' , { module : 'auth-handler' } ) ;
You can’t perform that action at this time.
0 commit comments