Skip to content

Commit

Permalink
Better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
nmassey001 committed Feb 13, 2025
1 parent 365ac20 commit ceba30d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nlds_processors/transfer/put_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import minio
from minio.error import S3Error
from retry import retry
from urllib3.exceptions import HTTPError
from urllib3.exceptions import HTTPError, MaxRetryError

from nlds_processors.transfer.base_transfer import BaseTransferConsumer
from nlds.rabbit.consumer import State
Expand Down Expand Up @@ -55,7 +55,7 @@ def _make_bucket(self, transaction_id: str):
f"already exists",
RK.LOG_INFO,
)
except minio.error.S3Error as e:
except (minio.error.S3Error, MaxRetryError) as e:
raise TransferError(message=str(e))

def _transfer_files(
Expand Down Expand Up @@ -114,7 +114,7 @@ def _transfer_files(
body_json=body_json,
state=State.TRANSFER_PUTTING,
)
except (HTTPError, minio.error.S3Error) as e:
except (HTTPError, MaxRetryError) as e:
reason = (
f"Error uploading {path_details.path} to object " f"store: {e}."
)
Expand Down

0 comments on commit ceba30d

Please sign in to comment.