Merge pull request #6826 from nextcloud/fix-class-name-in-exception-logger-plugin
Fix class name in exception logger plugin
This commit is contained in:
commit
4e0c078f48
|
@ -27,28 +27,34 @@
|
||||||
|
|
||||||
namespace OCA\DAV\Connector\Sabre;
|
namespace OCA\DAV\Connector\Sabre;
|
||||||
|
|
||||||
|
use OCA\DAV\Connector\Sabre\Exception\PasswordLoginForbidden;
|
||||||
|
use OCP\Files\StorageNotAvailableException;
|
||||||
use OCP\ILogger;
|
use OCP\ILogger;
|
||||||
|
use Sabre\DAV\Exception\Forbidden;
|
||||||
|
use Sabre\DAV\Exception\NotAuthenticated;
|
||||||
|
use Sabre\DAV\Exception\NotFound;
|
||||||
|
use Sabre\DAV\Exception\PreconditionFailed;
|
||||||
use Sabre\DAV\Exception\ServiceUnavailable;
|
use Sabre\DAV\Exception\ServiceUnavailable;
|
||||||
|
|
||||||
class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin {
|
class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin {
|
||||||
protected $nonFatalExceptions = [
|
protected $nonFatalExceptions = [
|
||||||
'Sabre\DAV\Exception\NotAuthenticated' => true,
|
NotAuthenticated::class => true,
|
||||||
// If tokenauth can throw this exception (which is basically as
|
// If tokenauth can throw this exception (which is basically as
|
||||||
// NotAuthenticated. So not fatal.
|
// NotAuthenticated. So not fatal.
|
||||||
'OCA\DAV\Connector\Sabre\Exception\PasswordLoginForbidden' => true,
|
PasswordLoginForbidden::class => true,
|
||||||
// the sync client uses this to find out whether files exist,
|
// the sync client uses this to find out whether files exist,
|
||||||
// so it is not always an error, log it as debug
|
// so it is not always an error, log it as debug
|
||||||
'Sabre\DAV\Exception\NotFound' => true,
|
NotFound::class => true,
|
||||||
// this one mostly happens when the same file is uploaded at
|
// this one mostly happens when the same file is uploaded at
|
||||||
// exactly the same time from two clients, only one client
|
// exactly the same time from two clients, only one client
|
||||||
// wins, the second one gets "Precondition failed"
|
// wins, the second one gets "Precondition failed"
|
||||||
'Sabre\DAV\Exception\PreconditionFailed' => true,
|
PreconditionFailed::class => true,
|
||||||
// forbidden can be expected when trying to upload to
|
// forbidden can be expected when trying to upload to
|
||||||
// read-only folders for example
|
// read-only folders for example
|
||||||
'Sabre\DAV\Exception\Forbidden' => true,
|
Forbidden::class => true,
|
||||||
// Happens when an external storage or federated share is temporarily
|
// Happens when an external storage or federated share is temporarily
|
||||||
// not available
|
// not available
|
||||||
'Sabre\DAV\Exception\StorageNotAvailableException' => true,
|
StorageNotAvailableException::class => true,
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
|
|
Loading…
Reference in New Issue