Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bcmmbaga committed Sep 27, 2024
1 parent e3cf807 commit 9f697e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions management/server/idp/zitadel.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package idp

import (
"context"
"errors"
"fmt"
"io"
"net/http"
Expand Down Expand Up @@ -128,10 +129,10 @@ func readZitadelError(body io.ReadCloser) error {
}

if len(errsOut) == 0 {
return fmt.Errorf("data missing")
return errors.New("unknown error")
}

return fmt.Errorf(strings.Join(errsOut, " "))
return errors.New(strings.Join(errsOut, " "))
}

// NewZitadelManager creates a new instance of the ZitadelManager.
Expand Down
2 changes: 1 addition & 1 deletion management/server/idp/zitadel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func TestZitadelAuthenticate(t *testing.T) {
inputCode: 400,
inputResBody: "{}",
helper: JsonParser{},
expectedFuncExitErrDiff: fmt.Errorf("unable to get zitadel token, statusCode 400, zitadel: data missing"),
expectedFuncExitErrDiff: fmt.Errorf("unable to get zitadel token, statusCode 400, zitadel: unknown error"),
expectedCode: 200,
expectedToken: "",
}
Expand Down

0 comments on commit 9f697e8

Please sign in to comment.