mirror of
https://github.com/clearml/clearml
synced 2025-01-31 09:07:00 +00:00
Fix don't raise exception on ConnectionError (which actually indicates that a read has timed out)
This commit is contained in:
parent
bfc844696e
commit
190b25a44b
@ -78,13 +78,15 @@ class InterfaceBase(SessionInterface):
|
||||
except MaxRequestSizeError as e:
|
||||
res = CallResult(meta=ResponseMeta.from_raw_data(status_code=400, text=str(e)))
|
||||
error_msg = 'Failed sending: %s' % str(e)
|
||||
except requests.exceptions.ConnectionError:
|
||||
except requests.exceptions.ConnectionError as e:
|
||||
# We couldn't send the request for more than the retries times configure in the api configuration file,
|
||||
# so we will end the loop and raise the exception to the upper level.
|
||||
# Notice: this is a connectivity error and not a backend error.
|
||||
if raise_on_errors:
|
||||
raise
|
||||
# if raise_on_errors:
|
||||
# raise
|
||||
res = None
|
||||
if log and num_retries >= cls._num_retry_warning_display:
|
||||
log.warning('Retrying, previous request failed %s: %s' % (str(type(req)), str(e)))
|
||||
except cls._JSON_EXCEPTION as e:
|
||||
if log:
|
||||
log.error(
|
||||
|
Loading…
Reference in New Issue
Block a user