mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-21 23:21:26 +01:00
Merge pull request #9200 from ywk253100/190923_oidc_ping
Return a common error message when testing the oidc provider
This commit is contained in:
commit
4192a692cd
@ -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