diff --git a/management/server/idp/zitadel.go b/management/server/idp/zitadel.go index 1d7422989d5..9d7626844a5 100644 --- a/management/server/idp/zitadel.go +++ b/management/server/idp/zitadel.go @@ -2,6 +2,7 @@ package idp import ( "context" + "errors" "fmt" "io" "net/http" @@ -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. diff --git a/management/server/idp/zitadel_test.go b/management/server/idp/zitadel_test.go index c5981daa50d..722f94fe0b6 100644 --- a/management/server/idp/zitadel_test.go +++ b/management/server/idp/zitadel_test.go @@ -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: "", }