File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -333,22 +333,22 @@ class SofarCloud extends utils.Adapter {
333333 return data . data . accessToken ;
334334 }
335335
336- await this . incrementFailedLoginAttempts ( ) ;
337-
338336 const code = response . data . code ;
339337
340- this . log . error (
341- `Login failed: ${ data . message } (Attempt ${ this . failedLoginAttempts } /${ this . MAX_LOGIN_ATTEMPTS } . Code: ${ code } )` ,
342- ) ;
343-
344338 if ( code === "101021" ) {
345339 this . log . error ( "Wrong username" ) ;
340+ await this . incrementFailedLoginAttempts ( ) ;
346341 }
347342
348343 if ( code === "666666" ) {
349344 this . log . error ( "Wrong password" ) ;
345+ await this . incrementFailedLoginAttempts ( ) ;
350346 }
351347
348+ this . log . error (
349+ `Login failed: ${ data . message } (Attempt ${ this . failedLoginAttempts } /${ this . MAX_LOGIN_ATTEMPTS } . Code: ${ code } )` ,
350+ ) ;
351+
352352 if ( this . failedLoginAttempts >= this . MAX_LOGIN_ATTEMPTS ) {
353353 this . log . warn (
354354 "Maximum login attempts reached – adapter paused until configuration is corrected." ,
You can’t perform that action at this time.
0 commit comments