diff --git a/source/FFImageLoading.Common/Cache/DownloadCache.cs b/source/FFImageLoading.Common/Cache/DownloadCache.cs index a69b847b3..9be12044a 100644 --- a/source/FFImageLoading.Common/Cache/DownloadCache.cs +++ b/source/FFImageLoading.Common/Cache/DownloadCache.cs @@ -58,7 +58,7 @@ public virtual async Task DownloadAndCacheIfNeededAsync(string url, () => configuration.Logger.Debug(string.Format("Retry download: {0}", url))); if (responseBytes == null) - return null; + throw new HttpRequestException("No Content"); if (allowDiskCaching) { @@ -88,7 +88,7 @@ protected virtual async Task DownloadAsync(string url, CancellationToken throw new HttpRequestException(response.StatusCode.ToString()); if (response.Content == null) - throw new HttpRequestException("No HttpContent"); + throw new HttpRequestException("No Content"); using (var cancelReadTimeoutToken = new CancellationTokenSource()) {