Fix panic condition when no response is returned
This commit is contained in:
parent
0f9f80c181
commit
1e52ffef64
|
@ -73,6 +73,9 @@ func (e *Environment) ContainerInspect(ctx context.Context) (types.ContainerJSON
|
||||||
|
|
||||||
res, err := e.client.HTTPClient().Do(req)
|
res, err := e.client.HTTPClient().Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if res == nil {
|
||||||
|
return st, errdefs.Unknown(err)
|
||||||
|
}
|
||||||
return st, errdefs.FromStatusCode(err, res.StatusCode)
|
return st, errdefs.FromStatusCode(err, res.StatusCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user