Skip to content

Commit 704ba1a

Browse files
authored
fix: correctly return an error for non http 200 response from nmagent (#1333)
Signed-off-by: Evan Baker <[email protected]>
1 parent b13d75a commit 704ba1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cns/nmagent/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ func (c *Client) GetNCVersionList(ctx context.Context) (*NetworkContainerListRes
255255
logger.Printf("[NMAgentClient][Response] GetNcVersionListWithOutToken response: %s, latency is %d", string(b), time.Since(now).Milliseconds())
256256

257257
if resp.StatusCode != http.StatusOK {
258-
return nil, errors.Wrap(err, "failed to GetNCVersionList")
258+
return nil, errors.Errorf("failed to GetNCVersionList with status %d", resp.StatusCode)
259259
}
260260

261261
var response NetworkContainerListResponse

0 commit comments

Comments
 (0)