filestack/filestack-python

filelink.get_metadata returns response object when error

khankuan opened this issue · 3 comments

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

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

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

Works well thanks!