Merge pull request #27678 from GreenHedgehog/master

Fix possible nil pointer dereference in azure sdk
b-tf-builtin-provider-parser-fix
James Bardin 5 years ago committed by GitHub
commit b0094dbf36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"log"
"net/http"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/go-uuid"
@ -39,7 +40,7 @@ func (c *RemoteClient) Get() (*remote.Payload, error) {
ctx := context.TODO()
blob, err := c.giovanniBlobClient.Get(ctx, c.accountName, c.containerName, c.keyName, options)
if err != nil {
if blob.Response.StatusCode == 404 {
if blob.Response.IsHTTPStatus(http.StatusNotFound) {
return nil, nil
}
return nil, err

Loading…
Cancel
Save