Skip to content

Commit

Permalink
fix: login function was returning fixed error (#2308)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alevsk committed Sep 12, 2022
1 parent f7b142e commit cc581c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions restapi/user_login.go
Expand Up @@ -125,7 +125,7 @@ func getLoginResponse(params authApi.LoginParams) (*models.LoginResponse, *model
// prepare console credentials
consoleCreds, err = getConsoleCredentials(lr.AccessKey, lr.SecretKey)
if err != nil {
return nil, ErrorWithContext(ctx, ErrInvalidLogin)
return nil, ErrorWithContext(ctx, err, ErrInvalidLogin)
}
}

Expand All @@ -135,7 +135,7 @@ func getLoginResponse(params authApi.LoginParams) (*models.LoginResponse, *model
}
sessionID, err := login(consoleCreds, sf)
if err != nil {
return nil, ErrorWithContext(ctx, ErrInvalidLogin)
return nil, ErrorWithContext(ctx, err, ErrInvalidLogin)
}
// serialize output
loginResponse := &models.LoginResponse{
Expand Down

0 comments on commit cc581c6

Please sign in to comment.