Throw IOException if server sends bad response data
This commit is contained in:
parent
7dd1898761
commit
67a884f03c
|
@ -89,7 +89,7 @@ public class CachedResource<K, R> implements Resource<R> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
throw new IllegalStateException(String.format("Response data is null: %s => %s", key, url));
|
throw new IOException(String.format("Response data is null: %s => %s", key, url));
|
||||||
}
|
}
|
||||||
|
|
||||||
return parse.transform(data);
|
return parse.transform(data);
|
||||||
|
|
Loading…
Reference in New Issue