Fix error handling

This commit is contained in:
2021-01-14 10:37:34 +01:00
parent 6fe026ee74
commit 23ad175f98

View File

@@ -30,7 +30,7 @@ public class APIFootballUpdater {
S3Provider prov = new S3Provider();
prov.writeFixturesToS3(league, content);
} catch (Exception e) {
if(e.getMessage().endsWith("did not have any results with status: 'Too many requests. Your rate limit is 10 requests per minute.")) {
if(e.getMessage().endsWith("did not have any results with status: 'Too many requests. Your rate limit is 10 requests per minute.'")) {
try {
Thread.sleep(1000 * 60);
String content = getRawData(apiFootballUrl);
@@ -68,7 +68,7 @@ public class APIFootballUpdater {
S3Provider prov = new S3Provider();
prov.writeRoundsToS3(league, content);
} catch (Exception e) {
if(e.getMessage().endsWith("did not have any results with status: 'Too many requests. Your rate limit is 10 requests per minute.")) {
if(e.getMessage().endsWith("did not have any results with status: 'Too many requests. Your rate limit is 10 requests per minute.'")) {
try {
Thread.sleep(1000 * 60);
String content = getRawData(apiFootballUrl);