Skip to content

Commit

Permalink
Replace EmptyS3EndpointURLError
Browse files Browse the repository at this point in the history
  • Loading branch information
rossgray committed Dec 13, 2024
1 parent fa05aae commit 1699713
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions posthog/temporal/batch_exports/s3_batch_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@
"NoSuchBucket",
# Couldn't connect to custom S3 endpoint
"EndpointConnectionError",
# Input contained an empty S3 endpoint URL
"EmptyS3EndpointURLError",
# User provided an invalid S3 key
"InvalidS3Key",
# All consumers failed with non-retryable errors.
Expand Down Expand Up @@ -159,13 +157,6 @@ def __init__(self, part_number: int):
super().__init__(f"An intermittent `RequestTimeout` was raised while attempting to upload part {part_number}")


class EmptyS3EndpointURLError(Exception):
"""Exception raised when an S3 endpoint URL is empty string."""

def __init__(self):
super().__init__("Endpoint URL cannot be empty.")


class InvalidS3EndpointError(Exception):
"""Exception raised when an S3 endpoint is invalid."""

Expand Down Expand Up @@ -222,7 +213,7 @@ def __init__(
self.pending_parts: list[Part] = []

if self.endpoint_url == "":
raise EmptyS3EndpointURLError()
raise InvalidS3EndpointError("Endpoint URL is empty.")

def to_state(self) -> S3MultiPartUploadState:
"""Produce state tuple that can be used to resume this S3MultiPartUpload."""
Expand Down

0 comments on commit 1699713

Please sign in to comment.