diff --git a/lib/Push.php b/lib/Push.php index beade4755..04e45d5d9 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -146,6 +146,7 @@ public function pushToDevice(int $id, INotification $notification) { } catch (\Exception $e) { $this->log->logException($e, [ 'app' => 'notifications', + 'level' => $e->getCode() === Http::STATUS_BAD_REQUEST ? ILogger::INFO : ILogger::WARN, ]); continue; } diff --git a/tests/Unit/PushTest.php b/tests/Unit/PushTest.php index 4b4862a94..00bb68a47 100644 --- a/tests/Unit/PushTest.php +++ b/tests/Unit/PushTest.php @@ -435,6 +435,7 @@ public function testPushToDeviceSending($isDebug) { ->method('logException') ->with($e, [ 'app' => 'notifications', + 'level' => ILogger::WARN, ]); /** @var IResponse|\PHPUnit_Framework_MockObject_MockObject $response1 */