Automattic / knox

S3 Lib
MIT License
1.74k stars 285 forks source link

getFile dont throw error when object key doesnt exist #203

Closed ftrianakast closed 11 years ago

ftrianakast commented 11 years ago

When you try to read a file from Amazon and the key/file doesn't exist the library doesnt throw an error. The error is recognized as a good answer. When I print the content I obtain the error:

<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.     </Message><Key>em-pty</Key><RequestId>424CCC675DF965F3</RequestId>     <HostId>Atk51HNgZTdZcW4srMulLc49moe0xyHucZxVa3W9vPuhb3q9l+e6nc0MYQUceKcP</HostId></Error> 

I think is good idea to have a complete error flow. Only a suggestion

domenic commented 11 years ago

Dupe of #114.