A plain Context canceled error without further context is not helpful. This PR adds a first round of error wrapping to the high-level functions in the LB controller. I've omitted adding error wrapping to all leaf functions so far.
Gophercloud 1.10 introduced context aware functions. For this, the existing providerClient.Context field and the passed in context are merged. However, in provider_client.go in function doRequest the merged context is canceled using defer. This prevents reading from the Body of the returned http.Response. When using the new context-aware functions, the merge is not used and therefore reading the result works.
As we cannot use the new context-aware functions everywhere, the only option is to downgrade gophercloud.
A plain
Context canceled
error without further context is not helpful. This PR adds a first round of error wrapping to the high-level functions in the LB controller. I've omitted adding error wrapping to all leaf functions so far.Gophercloud 1.10 introduced context aware functions. For this, the existing
providerClient.Context
field and the passed in context are merged. However, inprovider_client.go
in functiondoRequest
the merged context is canceled using defer. This prevents reading from the Body of the returnedhttp.Response
. When using the new context-aware functions, the merge is not used and therefore reading the result works.As we cannot use the new context-aware functions everywhere, the only option is to downgrade gophercloud.