We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e06a32 commit 942bc8dCopy full SHA for 942bc8d
flutter_cache_manager/lib/src/cache_manager.dart
@@ -151,10 +151,12 @@ class CacheManager implements BaseCacheManager {
151
cacheLogger.log(
152
'CacheManager: Failed to download file from $url with error:\n$e',
153
CacheManagerLogLevel.debug);
154
- if (streamController.hasListener) {
+ if (cacheFile == null && streamController.hasListener) {
155
streamController.addError(e);
156
}
157
- if (cacheFile != null) {
+
158
+ if (cacheFile != null && e is HttpExceptionWithStatus && e.statusCode == 404) {
159
+ streamController.addError(e);
160
await removeFile(key);
161
162
0 commit comments