Browse Source

HUE-6694 [aws] Gracefully handle bucket creation error for non-DNS compliant names

Jenny Kim 8 years ago
parent
commit
639b3e2a65
1 changed files with 2 additions and 0 deletions
  1. 2 0
      desktop/libs/aws/src/aws/s3/s3fs.py

+ 2 - 0
desktop/libs/aws/src/aws/s3/s3fs.py

@@ -165,6 +165,8 @@ class S3FileSystem(object):
 
     try:
       key = self._get_key(path, validate=True)
+    except BotoClientError, e:
+      raise S3FileSystemException(_('Failed to access path "%s": %s') % (path, e.reason))
     except S3ResponseError as e:
       if e.status == 404:
         return None