mirror of
https://github.com/mitb-archive/filebot
synced 2024-08-13 17:03:45 -04:00
Throw exception if result is null (shouldn't happen unless cache/etag is out of sync)
This commit is contained in:
parent
2fac737052
commit
397fb14be7
@ -85,6 +85,10 @@ public class CachedResource<K, R> implements Resource<R> {
|
|||||||
return element.getObjectValue();
|
return element.getObjectValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data == null) {
|
||||||
|
throw new IllegalStateException(String.format("Response data is null: %s => %s", key, url));
|
||||||
|
}
|
||||||
|
|
||||||
return parse.transform(data);
|
return parse.transform(data);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
debug.warning(format("Fetch failed: %s", e.getMessage()));
|
debug.warning(format("Fetch failed: %s", e.getMessage()));
|
||||||
|
Loading…
Reference in New Issue
Block a user