Merge pull request #58453 from nextcloud/bugfix/noid/update-notifier-exception-handling

fix(notifications): Update notifier exception handling
This commit is contained in:
Joas Schilling 2026-02-25 10:29:45 +01:00 committed by GitHub
commit 346c4bd69a
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);