Merge pull request #58583 from nextcloud/backport/58453/stable33

[stable33] fix(notifications): Update notifier exception handling
This commit is contained in:
Joas Schilling 2026-02-27 11:51:22 +01:00 committed by GitHub
commit 94af22c4a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,7 +8,6 @@ declare(strict_types=1);
*/
namespace OCA\DAV\CardDAV\Notification;
use InvalidArgumentException;
use OCA\DAV\AppInfo\Application;
use OCP\IL10N;
use OCP\L10N\IFactory;
@ -42,7 +41,7 @@ class Notifier implements INotifier {
*/
public function prepare(INotification $notification, string $languageCode): INotification {
if ($notification->getApp() !== Application::APP_ID) {
throw new InvalidArgumentException();
throw new UnknownNotificationException();
}
$l = $this->l10nFactory->get(Application::APP_ID, $languageCode);