Handle exceptions when connecting to S3 buckets to allow partial fetching