Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
Fix OpenAccount error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Sheiko committed Sep 16, 2023
1 parent 94503a2 commit 1d28e43
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,15 @@ func (s *Scraper) LoginOpenAccount() error {
if info.Subtasks[0].SubtaskID == "OpenAccount" {
s.oAuthToken = info.Subtasks[0].OpenAccount.OAuthToken
s.oAuthSecret = info.Subtasks[0].OpenAccount.OAuthTokenSecret
if s.oAuthToken == "" || s.oAuthSecret == "" {
return fmt.Errorf("auth error: %v", "Token or Secret is empty")
}
s.isLogged = true
s.isOpenAccount = true
return nil
}
}
return nil
return fmt.Errorf("auth error: %v", "OpenAccount")
}

// Logout is reset session
Expand Down

0 comments on commit 1d28e43

Please sign in to comment.