lib/paperclip/storage/azure.rb in paperclip-azure-0.2.12 vs lib/paperclip/storage/azure.rb in paperclip-azure-0.2.13

- old
+ new

@@ -138,10 +138,11 @@ 500 end status_code = 500 if status_code == 0 retry_data[:count] ||= 0 - if (status_code >= 300 && status_code < 500 && status_code != 408) || + if (!response.nil? && response.success? && retry_data[:error].nil?) || + (status_code >= 300 && status_code < 500 && status_code != 408) || status_code == 501 || status_code == 505 || (!retry_data[:error].nil? && retry_data[:error].description == 'Blob type of the blob reference doesn\'t match blob type of the blob.') || retry_data[:count] >= 5 retry_data[:count] = 0