azure: revendor + remove hacky solution in is404
Removing the temporary workaround in is404() method by re-vendoring the azure-sdk-for-go. Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
This commit is contained in:
committed by
Derek McGowan
parent
129ad8ea0c
commit
0a1ce58e2c
@@ -397,14 +397,6 @@ func (d *driver) listBlobs(container, virtPath string) ([]string, error) {
|
||||
}
|
||||
|
||||
func is404(err error) bool {
|
||||
// handle the case when the request was a HEAD and service error could not
|
||||
// be parsed, such as "storage: service returned without a response body
|
||||
// (404 The specified blob does not exist.)"
|
||||
if strings.Contains(fmt.Sprintf("%v", err), "404 The specified blob does not exist") {
|
||||
return true
|
||||
}
|
||||
|
||||
// common case
|
||||
statusCodeErr, ok := err.(azure.AzureStorageServiceError)
|
||||
return ok && statusCodeErr.StatusCode == http.StatusNotFound
|
||||
}
|
||||
|
Reference in New Issue
Block a user