Skip to content

Commit

Permalink
fix: unexpected HTTP status code (kubesphere#6241)
Browse files Browse the repository at this point in the history
fix: Update member cluster mirror service verification response infor… (kubesphere#1992)

* fix: repository verify error

* Update pkg/kapis/resources/v1alpha3/handler.go

---------

Co-authored-by: smartcat999 <49057502+smartcat999@users.noreply.github.com>
  • Loading branch information
wansir and smartcat999 authored Oct 28, 2024
1 parent 1fd47dd commit 7992b75
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/kapis/resources/v1alpha3/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ func (h *handler) VerifyImageRepositorySecret(request *restful.Request, response

ok, err := h.registryHelper.Auth(secret)
if !ok {
klog.Error(err)
api.HandleUnauthorized(response, request, err)
api.HandleBadRequest(response, request, fmt.Errorf("registry auth failed with err: %s", err))
} else {
response.WriteHeaderAndJson(http.StatusOK, secret, restful.MIME_JSON)
}
Expand Down

0 comments on commit 7992b75

Please sign in to comment.