Logging fixes
This commit is contained in:
@@ -34,9 +34,9 @@ def _submit_and_update_g(benchmark_data: dict) -> None:
|
|||||||
except exceptions.CommunicationError as ex:
|
except exceptions.CommunicationError as ex:
|
||||||
log.error('Error %d submitting benchmark: %s', ex.status_code, ex.message)
|
log.error('Error %d submitting benchmark: %s', ex.status_code, ex.message)
|
||||||
if ex.json:
|
if ex.json:
|
||||||
log.error('Response JSON:', ex.json)
|
log.error('Response JSON: %r', ex.json)
|
||||||
else:
|
else:
|
||||||
log.error('Response body: %s', ex.body)
|
log.error('Response body: %r', ex.body)
|
||||||
set_exception(ex)
|
set_exception(ex)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@@ -164,7 +164,7 @@ class BenchmarkClient:
|
|||||||
headers={'Authorization': f'Bearer {self.auth_token}'},
|
headers={'Authorization': f'Bearer {self.auth_token}'},
|
||||||
timeout=timeouts.submit)
|
timeout=timeouts.submit)
|
||||||
if resp.status_code != 201:
|
if resp.status_code != 201:
|
||||||
log.error('Bad status code %d received: %s', resp.status_code, resp.text)
|
log.debug('Bad status code %d received: %s', resp.status_code, resp.text)
|
||||||
raise exceptions.CommunicationError(f'Bad status code received', resp)
|
raise exceptions.CommunicationError(f'Bad status code received', resp)
|
||||||
|
|
||||||
result = resp.json()
|
result = resp.json()
|
||||||
|
Reference in New Issue
Block a user