diff --git a/src/main/java/de/jeyp91/apifootball/APIFootballUpdater.java b/src/main/java/de/jeyp91/apifootball/APIFootballUpdater.java index fd33eab..7b1196f 100644 --- a/src/main/java/de/jeyp91/apifootball/APIFootballUpdater.java +++ b/src/main/java/de/jeyp91/apifootball/APIFootballUpdater.java @@ -16,6 +16,7 @@ public class APIFootballUpdater { private final String exceededLimitDayError = "{\"api\":{\"results\":0,\"error\":\"You have reached the request limit for the day\"}}"; private final String exceededLimitMinuteError = "{\"api\":{\"results\":0,\"error\":\"Too many requests. Your rate limit is 10 requests per minute.\"}}"; + private final String exceededLimitMinuteError2 = "{\"api\":{\"results\":0,\"status\":\"Too many requests. Your rate limit is 10 requests per minute.\"}}"; private final String wrongEndpointError = "{\"api\":{\"results\":0,\"error\":\"This endpoint does not exist or your parameters are incorrect, contact our support.\"}}"; public APIFootballUpdater() { @@ -103,6 +104,9 @@ public class APIFootballUpdater { if (result.toString().equals(exceededLimitMinuteError)) { throw new Exception(requestUrl + " gave error:" + exceededLimitMinuteError); } + if (result.toString().equals(exceededLimitMinuteError2)) { + throw new Exception(requestUrl + " gave error:" + exceededLimitMinuteError2); + } return result.toString(); }