Skip to content

Commit 680e823

Browse files
author
Hunter Skrasek
committed
Update RackspaceAdapter->has() to catch OpenCloud ObjectNotFoundExceptions, to return a proper has value.
1 parent ee607ae commit 680e823

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Adapter/Rackspace.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use League\Flysystem\Util;
66
use OpenCloud\ObjectStore\Resource\Container;
77
use OpenCloud\ObjectStore\Resource\DataObject;
8+
use OpenCloud\ObjectStore\Exception\ObjectNotFoundException;
89
use Guzzle\Http\Exception\ClientErrorResponseException;
910

1011
class Rackspace extends AbstractAdapter
@@ -163,6 +164,8 @@ public function has($path)
163164
$object = $this->getObject($path);
164165
} catch(ClientErrorResponseException $e) {
165166
return false;
167+
} catch(ObjectNotFoundException $e) {
168+
return false;
166169
}
167170

168171
return $this->normalizeObject($object);

0 commit comments

Comments
 (0)