filestack / filestack-python

Official Python SDK for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
https://www.filestack.com
Apache License 2.0
48 stars 20 forks source link

filelink.get_metadata returns response object when error #21

Closed khankuan closed 7 years ago

khankuan commented 7 years ago

The following returns invalid metadata.

filelink = client.upload(url)
metadata = filelink.get_metadata()
print(metadata)

TypeError: 'Response' object does not support item assignment
<Response [400]>

1) The metadata url returned 400 bad request. 2) The utils.make_call should throw an exception instead of returning the failed response without errors.

Cheers

staturecrane commented 7 years ago

@khankuan Yes, this can be added. Thanks for the catch.

staturecrane commented 7 years ago

@khankuan This functionality was added as part of newest release. Closing this for now. Thanks!

khankuan commented 7 years ago

Works well thanks!