fix: correctly return an error for non http 200 response from nmagent (#1333)
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
This commit is contained in:
Родитель
b13d75a99d
Коммит
704ba1adf5
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче