diff --git a/main.cpp b/main.cpp index 5a79c70..ba10767 100644 --- a/main.cpp +++ b/main.cpp @@ -342,6 +342,12 @@ json getJson(unsigned short threadId, string url, string directoryPath) exit(1); } + if(data.contains("error")) + { + PRINT(threadId, "Found error in JSON at URL: " << finalUrl << " for content: " << content << " !") + return getJson(threadId, url, directoryPath); + } + ostringstream toString; toString << CHANNELS_DIRECTORY << directoryPath << "/" << requestsPerChannel << ".json"; requestsPerChannel++;