mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 09:08:26 +01:00
Return a common error message when testing the oidc provider
Returning a common error when failed to test the oidc provider and printing the detail in the log Signed-off-by: Wenkai Yin <yinw@vmware.com>
This commit is contained in:
parent
63373c8ef9
commit
6efdfa5fb4
@ -16,6 +16,7 @@ package api
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/goharbor/harbor/src/common/utils/log"
|
||||
"github.com/goharbor/harbor/src/common/utils/oidc"
|
||||
)
|
||||
@ -50,7 +51,7 @@ func (oa *OIDCAPI) Ping() {
|
||||
}
|
||||
if err := oidc.TestEndpoint(c); err != nil {
|
||||
log.Errorf("Failed to verify connection: %+v, err: %v", c, err)
|
||||
oa.SendBadRequestError(err)
|
||||
oa.SendBadRequestError(errors.New("failed to verify connection"))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user