diff --git a/deltacat/aws/s3u.py b/deltacat/aws/s3u.py index 7391440a..e08994f4 100644 --- a/deltacat/aws/s3u.py +++ b/deltacat/aws/s3u.py @@ -575,7 +575,6 @@ def _put_object( ) except ClientError as e: if e.response["Error"]["Code"] in BOTO_THROTTLING_ERROR_CODES: - # TODO: Differentiate upload table vs upload object errors error_code = e.response["Error"]["Code"] raise RetryableUploadFileError( f"Retry upload for: {bucket}/{key} after receiving {error_code}", diff --git a/deltacat/tests/test_exceptions.py b/deltacat/tests/test_exceptions.py index 9f843ffe..a740960b 100644 --- a/deltacat/tests/test_exceptions.py +++ b/deltacat/tests/test_exceptions.py @@ -86,3 +86,15 @@ def test_unclassified_error_when_error_cannot_be_categorized(self): UnclassifiedDeltaCatError, lambda: ray.get(mock_remote_task.remote(MockUnknownException)), ) + + def test_deltacat_exception_contains_attributes(self): + + try: + mock_raise_exception(ConnectionError) + except DeltaCatTransientError as e: + self.assertTrue(hasattr(e, "is_retryable")) + self.assertTrue(hasattr(e, "error_name")) + assert e.error_name == "DeltaCatTransientError" + return + + self.assertFalse(True) diff --git a/deltacat/tests/test_logs.py b/deltacat/tests/test_logs.py index 9c98b5c9..2dd81f25 100644 --- a/deltacat/tests/test_logs.py +++ b/deltacat/tests/test_logs.py @@ -38,6 +38,7 @@ def test_formatMessage_sanity(self): self.assertEqual({"message": "test_message"}, result) def test_format_sanity(self): + ray.shutdown() formatter = JsonFormatter({"message": "msg"}) record = LogRecord(