Skip to content

Commit

Permalink
merge error output into exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
landscapepainter committed Jun 8, 2024
1 parent ecbab0e commit 6640c15
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sky/data/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1449,10 +1449,10 @@ def _delete_s3_bucket(self, bucket_name: str) -> bool:
bucket_name=bucket_name))
return False
else:
logger.error(e.output)
with ux_utils.print_exception_no_traceback():
raise exceptions.StorageBucketDeleteError(
f'Failed to delete S3 bucket {bucket_name}.')
f'Failed to delete S3 bucket {bucket_name}.'
f'Detailed error: {e.output}')

# Wait until bucket deletion propagates on AWS servers
while data_utils.verify_s3_bucket(bucket_name):
Expand Down Expand Up @@ -1899,10 +1899,10 @@ def _delete_gcs_bucket(self, bucket_name: str) -> bool:
executable='/bin/bash')
return True
except subprocess.CalledProcessError as e:
logger.error(e.output)
with ux_utils.print_exception_no_traceback():
raise exceptions.StorageBucketDeleteError(
f'Failed to delete GCS bucket {bucket_name}.')
f'Failed to delete GCS bucket {bucket_name}.'
f'Detailed error: {e.output}')


class AzureBlobStore(AbstractStore):
Expand Down Expand Up @@ -2443,10 +2443,10 @@ def _delete_az_bucket(self, container_name: str) -> bool:
bucket_name=container_name))
return False
else:
logger.error(e.output)
with ux_utils.print_exception_no_traceback():
raise exceptions.StorageBucketDeleteError(
f'Failed to delete Azure container {container_name}.')
f'Failed to delete Azure container {container_name}. '
f'Detailed error: {e.output}')
return True


Expand Down Expand Up @@ -2823,10 +2823,10 @@ def _delete_r2_bucket(self, bucket_name: str) -> bool:
bucket_name=bucket_name))
return False
else:
logger.error(e.output)
with ux_utils.print_exception_no_traceback():
raise exceptions.StorageBucketDeleteError(
f'Failed to delete R2 bucket {bucket_name}.')
f'Failed to delete R2 bucket {bucket_name}.'
f'Detailed error: {e.output}')

# Wait until bucket deletion propagates on AWS servers
while data_utils.verify_r2_bucket(bucket_name):
Expand Down

0 comments on commit 6640c15

Please sign in to comment.