diff --git a/main.py b/main.py index 8e75d9d..350bfb5 100644 --- a/main.py +++ b/main.py @@ -49,6 +49,12 @@ for row in rows: try: r = requests.get(link + '/api/v1/version', headers=headers) + if r.status_code != 200: + print("Error while fetching " + link + '/api/v1/version. We got a ' + str(r.status_code) + ' status code. Skipping...') + continue + if r.headers['Content-Type'] != 'application/json': + print("Error while fetching " + link + '/api/v1/version. We got a ' + r.headers['Content-Type'] + ' content type. Skipping...') + continue except: print("Error while fetching " + link + '/api/v1/version. Skipping...') continue