def translate_s3_error(fn):
  @wraps(fn)
  def wrapped(*args, **kwargs):
    try:
      return fn(*args, **kwargs)
    except S3ResponseError:
      _, exc, tb = sys.exc_info()
      logging.error('S3 error: %s' % exc)
      lookup = lookup_s3error(exc)
      raise lookup.__class__, lookup, tb
  return wrapped
dataset/ETHPy150Open cloudera/hue/desktop/libs/aws/src/aws/s3/__init__.py/translate_s3_error/original