From becc5c3f8e225004c0ca511cc99b71d3dff7a686 Mon Sep 17 00:00:00 2001 From: Evan Baker Date: Fri, 15 Apr 2022 23:13:04 +0000 Subject: [PATCH] fix: correctly return an error for non http 200 response from nmagent Signed-off-by: Evan Baker --- cns/nmagent/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cns/nmagent/client.go b/cns/nmagent/client.go index ce0d8c5db7..83eb3949eb 100644 --- a/cns/nmagent/client.go +++ b/cns/nmagent/client.go @@ -255,7 +255,7 @@ func (c *Client) GetNCVersionList(ctx context.Context) (*NetworkContainerListRes logger.Printf("[NMAgentClient][Response] GetNcVersionListWithOutToken response: %s, latency is %d", string(b), time.Since(now).Milliseconds()) if resp.StatusCode != http.StatusOK { - return nil, errors.Wrap(err, "failed to GetNCVersionList") + return nil, errors.Errorf("failed to GetNCVersionList with status %d", resp.StatusCode) } var response NetworkContainerListResponse