Do not log WebDAV maintenance mode exception#6132
Conversation
|
@mwries please test this as well 😉 |
| $level = \OCP\Util::FATAL; | ||
| if (isset($this->nonFatalExceptions[$exceptionClass])) { | ||
| if (isset($this->nonFatalExceptions[$exceptionClass]) || | ||
| ($exceptionClass === 'Sabre\DAV\Exception\ServiceUnavailable' && $ex->getMessage() === 'System in maintenance mode.')) { |
There was a problem hiding this comment.
I'd prefer a custom exception in \OCA\DAV\Connector\Sabre\MaintenancePlugin::checkMaintenanceMode and then match also on ::class.
Right now this, for example, doesn't catch the Upgrade needed. A custom exception would help here.
There was a problem hiding this comment.
The problem is, that then the webdav response would change
There was a problem hiding this comment.
And the "upgrade needed" should also not be catched, because this is more fishy I think and worth to log.
There was a problem hiding this comment.
This would change then the response too:
<?xml version="1.0" encoding="utf-8"?>
<d:error
xmlns:d="DAV:"
xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\ServiceUnavailable</s:exception>
<s:message>System in maintenance mode.</s:message>
</d:error>| return [ | ||
| [0, '', new NotFound()], | ||
| [0, 'System in maintenance mode.', new ServiceUnavailable('System in maintenance mode.')], | ||
| [4, 'Upgrade needed', new InvalidPath('Upgrade needed')], |
f61805f to
dbb247a
Compare
Log the maintenance mode exception only in debug level. Fixes #6124 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
dbb247a to
fc12bd0
Compare
|
Reported again, time to backport? |
I'm open for this. Stable12 should be okay. |
|
Let me do it |
|
Backport to stable12 in #6908 |
Log the maintenance mode exception only in debug level. Fixes #6124
How to test: