views: skip non-200 OK requests to servers

Update multi_request() to skip non-200 OK requests to servers, otherwise
traceback is displayed while trying to access the json body.
master
OpenGnSys Support Team 2024-06-12 11:08:28 +02:00
parent 95b2e20015
commit 454999a895
1 changed files with 3 additions and 0 deletions

View File

@ -241,6 +241,9 @@ def multi_request(method, uri, payload=None):
if not r:
continue
if r.status_code != requests.codes.ok:
continue
response['server'] = server
response['json'] = r.json()
responses.append(response)