Error handling on gonewild rips
This commit is contained in:
parent
c48ebff21d
commit
7c63f3a492
@ -64,6 +64,10 @@ public class GonewildRipper extends AbstractRipper {
|
|||||||
.execute()
|
.execute()
|
||||||
.body();
|
.body();
|
||||||
json = new JSONObject(jsonString);
|
json = new JSONObject(jsonString);
|
||||||
|
if (json.has("error")) {
|
||||||
|
logger.error("Error while retrieving user posts:" + json.getString("error"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
posts = json.getJSONArray("posts");
|
posts = json.getJSONArray("posts");
|
||||||
if (posts.length() == 0) {
|
if (posts.length() == 0) {
|
||||||
break; // No more posts to get
|
break; // No more posts to get
|
||||||
|
Loading…
Reference in New Issue
Block a user