Skip to content

Commit

Permalink
fix: parse auth login errors
Browse files Browse the repository at this point in the history
  • Loading branch information
marianozunino committed Oct 9, 2024
1 parent a7defc0 commit a199b59
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/sdm/sdm.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ func (s *SDMClient) Ready() (SdmReady, error) {
func (s *SDMClient) Logout() error {
return s.CommandRunner.RunCommand(
cmder.WithArgs("logout"),
cmder.WithOutput(io.Discard),
cmder.WithErrorParser(parseSdmError),
)
}

Expand All @@ -58,6 +60,7 @@ func (s *SDMClient) Login(email, password string) error {
return s.CommandRunner.RunCommand(
cmder.WithArgs("login", "--email", email),
cmder.WithStdin(stdin),
cmder.WithOutput(io.Discard),
cmder.WithErrorParser(parseSdmError),
)
}
Expand All @@ -75,5 +78,7 @@ func (s *SDMClient) Status(output io.Writer) error {
func (s *SDMClient) Connect(dataSource string) error {
return s.CommandRunner.RunCommand(
cmder.WithArgs("connect", dataSource),
cmder.WithOutput(io.Discard),
cmder.WithErrorParser(parseSdmError),
)
}

0 comments on commit a199b59

Please sign in to comment.