Show better error when failing to download an artifact

This commit is contained in:
allegroai 2022-06-26 18:17:59 +03:00
parent 3fce450250
commit 70de28ce7b

View File

@ -1207,7 +1207,7 @@ class _HttpDriver(_Driver):
obj.url, timeout=(int(self.timeout_connection), int(self.timeout_total)),
headers=container.get_headers(obj.url))
if res.status_code != requests.codes.ok:
raise ValueError('Failed getting object %s (%d): %s' % (obj.object_name, res.status_code, res.text))
raise ValueError('Failed getting object %s (%d): %s' % (obj.object_name, res.status_code, res.reason))
return res
def download_object_as_stream(self, obj, chunk_size=64 * 1024, **_):