This is a general approach to the generated SDK, so affects _many_ APIs and versions, if not all that use futures/LROs. The autorest result is no longer being assigned to the future.Response() which means on error, this causes a panic if checked for the response code:
e.g.
future, err := client.Delete(ctx, id.ResourceGroup, id.HostingEnvironmentName, forceDeleteAllChildren)
if err != nil {
if response.WasNotFound(future.Response()) {
return nil
}
}
panic: runtime error: invalid memory address or nil pointer dereferenceA PR that may fix this is here: https://github.com/Azure/autorest.go/pull/605
Hi @jackofallops thanks for opening this.
The fix in autorest.go for this issue has been merged. And we are planning to release an extra minor version today to refresh every package in the sdk to resolve this.
Most helpful comment
Hi @jackofallops thanks for opening this.
The fix in autorest.go for this issue has been merged. And we are planning to release an extra minor version today to refresh every package in the sdk to resolve this.