diff --git a/client/lxd.go b/client/lxd.go index 796a6fb5c2bb..ca29b1ab0b41 100644 --- a/client/lxd.go +++ b/client/lxd.go @@ -221,7 +221,7 @@ func lxdParseResponse(resp *http.Response) (*api.Response, string, error) { // Handle errors if response.Type == api.ErrorResponse { - return nil, "", api.StatusErrorf(resp.StatusCode, response.Error) + return nil, "", api.NewStatusError(resp.StatusCode, response.Error) } return &response, etag, nil