| @@ 133-138 (lines=6) @@ | ||
| 130 | return $object; |
|
| 131 | } catch (BadResponseError $e) { |
|
| 132 | // Expected response is "404 Not Found", so only log if it isn't |
|
| 133 | if ($e->getResponse()->getStatusCode() !== 404) { |
|
| 134 | \OC::$server->getLogger()->logException($e, [ |
|
| 135 | 'level' => \OCP\Util::ERROR, |
|
| 136 | 'app' => 'files_external', |
|
| 137 | ]); |
|
| 138 | } |
|
| 139 | $this->objectCache->set($path, false); |
|
| 140 | return false; |
|
| 141 | } |
|
| @@ 382-388 (lines=7) @@ | ||
| 379 | $this->objectCache->remove($path); |
|
| 380 | $this->objectCache->remove($path . '/'); |
|
| 381 | } catch (BadResponseError $e) { |
|
| 382 | if ($e->getResponse()->getStatusCode() !== 404) { |
|
| 383 | \OC::$server->getLogger()->logException($e, [ |
|
| 384 | 'level' => \OCP\Util::ERROR, |
|
| 385 | 'app' => 'files_external', |
|
| 386 | ]); |
|
| 387 | throw $e; |
|
| 388 | } |
|
| 389 | } |
|
| 390 | ||
| 391 | return true; |
|