MarketSquare / robotframework-aws

Custom Library for Robot Framework to interact with Amazon Cloud Services
MIT License
23 stars 18 forks source link

Code for `Key Should Exist` (s3.py) needs to modified #28

Closed adrianyorke closed 1 month ago

adrianyorke commented 3 years ago

The client.head_object() call needs to be inside the try block so we trap any errors and handle them appropriately.

If the key exists it will just drop through and return True.

If the key does not exist it will drop into the except block where we should check for "404" response to confirm the error is just that the key does not exist, otherwise the error is something else and should be raised.