diff --git a/api/v1/registry/client/request/request.go b/api/v1/registry/client/request/request.go index b59f0d0..4f7af35 100644 --- a/api/v1/registry/client/request/request.go +++ b/api/v1/registry/client/request/request.go @@ -54,9 +54,6 @@ func perform(url, auth, mode string, trace bool) (resp *http.Response, err error if err != nil { return nil, err } - if resp.StatusCode != 200 && resp.StatusCode != 404 { - return resp, errors.New("Bad response status: " + resp.Status + " >> " + url) - } if trace { fmt.Printf("%s|@URL: %s\n", rid, url) @@ -70,6 +67,10 @@ func perform(url, auth, mode string, trace bool) (resp *http.Response, err error fmt.Printf("%s|--- BODY END ---\n", rid) } + if resp.StatusCode != 200 && resp.StatusCode != 404 { + return resp, errors.New("Bad response status: " + resp.Status + " >> " + url) + } + return resp, nil }