Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-914

s3.upload_object_via_stream now returns a generic error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Storage
    • Labels:
      None

      Description

      Consider the following snippet:

      import io
      from libcloud.storage.base import Container
      from libcloud.storage.drivers.google_storage import GoogleStorageDriver
      
      driver = GoogleStorageDriver(key='GOOG0123456789ABCXYZ', secret='garbage')
      container = Container(name='container', driver=driver, extra={})
      driver.upload_object_via_stream(io.BytesIO(b' '), container, 'path')
      

      I use wrong credentials on purpose. With libcloud 1.5.0, upload_object_via_stream raises libcloud.common.types.InvalidCredsError. With libcloud 2.0.0 and trunk, this returns the generic libcloud.common.types.LibcloudError with the message 'Object upload failed, Perhaps a timeout?'.

      Is it possible to restore the old behavior?

      Thanks for libcloud.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                quentinp Quentin Pradet
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: