Skip to content

Commit eff724a

Browse files
blob/azureblob: handle precondition error for BlobExists (#3635)
1 parent 7553548 commit eff724a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

blob/azureblob/azureblob.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,9 @@ func (b *bucket) ErrorCode(err error) gcerrors.ErrorCode {
665665
if code == bloberror.AuthenticationFailed {
666666
return gcerrors.PermissionDenied
667667
}
668+
if code == bloberror.BlobAlreadyExists {
669+
return gcerrors.FailedPrecondition
670+
}
668671
}
669672
if strings.Contains(err.Error(), "no such host") {
670673
// This happens with an invalid storage account name; the host

0 commit comments

Comments
 (0)