@@ -425,7 +425,7 @@ def sync_all(self, max_retry_attempts=_SYNC_ALL_NO_RETRIES):
425425 while True :
426426 try :
427427 sync_result = self .synchronize_splits (None , False )
428- if not sync_result .success and sync_result .error_code == 414 :
428+ if not sync_result .success and sync_result .error_code is not None and sync_result . error_code == 414 :
429429 _LOGGER .error ("URI too long exception caught, aborting retries" )
430430 break
431431
@@ -587,7 +587,7 @@ async def sync_all(self, max_retry_attempts=_SYNC_ALL_NO_RETRIES):
587587 while True :
588588 try :
589589 sync_result = await self .synchronize_splits (None , False )
590- if not sync_result .success and sync_result .error_code == 414 :
590+ if not sync_result .success and sync_result .error_code is not None and sync_result . error_code == 414 :
591591 _LOGGER .error ("URI too long exception caught, aborting retries" )
592592 break
593593
@@ -601,10 +601,6 @@ async def sync_all(self, max_retry_attempts=_SYNC_ALL_NO_RETRIES):
601601
602602 # All is good
603603 return
604- except APIUriException as exc :
605- _LOGGER .error ("URI too long exception, aborting retries." )
606- _LOGGER .debug ('Error: ' , exc_info = True )
607- break
608604 except Exception as exc : # pylint:disable=broad-except
609605 _LOGGER .error ("Exception caught when trying to sync all data: %s" , str (exc ))
610606 _LOGGER .debug ('Error: ' , exc_info = True )
0 commit comments