This commit is contained in:
Matthew Frahry 2021-03-22 14:20:54 -07:00
parent 3546650ac6
commit 0bbb0dc200
1 changed files with 2 additions and 2 deletions

View File

@ -110,7 +110,7 @@ func (c *RemoteClient) Delete() error {
ctx := context.TODO() ctx := context.TODO()
resp, err := c.giovanniBlobClient.Delete(ctx, c.accountName, c.containerName, c.keyName, options) resp, err := c.giovanniBlobClient.Delete(ctx, c.accountName, c.containerName, c.keyName, options)
if err != nil { if err != nil {
if resp.Response.StatusCode != 404 { if !resp.IsHTTPStatus(http.StatusNotFound) {
return err return err
} }
} }
@ -152,7 +152,7 @@ func (c *RemoteClient) Lock(info *statemgr.LockInfo) (string, error) {
properties, err := c.giovanniBlobClient.GetProperties(ctx, c.accountName, c.containerName, c.keyName, blobs.GetPropertiesInput{}) properties, err := c.giovanniBlobClient.GetProperties(ctx, c.accountName, c.containerName, c.keyName, blobs.GetPropertiesInput{})
if err != nil { if err != nil {
// error if we had issues getting the blob // error if we had issues getting the blob
if properties.Response.StatusCode != 404 { if !properties.Response.IsHTTPStatus(http.StatusNotFound) {
return "", getLockInfoErr(err) return "", getLockInfoErr(err)
} }
// if we don't find the blob, we need to build it // if we don't find the blob, we need to build it