Merge pull request #19000 from UoM-ResPlat-DevOps/swift-squelch-expected-404-errors

Don't log expected Swift 404 responses in files_external
This commit is contained in:
Thomas Müller 2015-10-29 11:26:24 +01:00
commit 7d96f82659
1 changed files with 4 additions and 1 deletions

View File

@ -106,7 +106,10 @@ class Swift extends \OC\Files\Storage\Common {
$this->getContainer()->getPartialObject($path);
return true;
} catch (ClientErrorResponseException $e) {
\OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);
// Expected response is "404 Not Found", so only log if it isn't
if ($e->getResponse()->getStatusCode() !== 404) {
\OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);
}
return false;
}
}