Skip to content

Cospend spamming logs with \\InvalidArgumentException since NC34 #407

Description

@utzdutz

NC34 deprecated the \\InvalidArguementExeption, which Cospend seems to be using. Therefore I get a whole lot of warnings in my logs (about 4 warnings every 30 seconds) looking like this:

{
  "reqId":"Dl7MLWCd9Zc0RUKhK4un",
  "level":2,
  "time":"2026-07-11T21:11:23+00:00",
  "remoteAddr":"[REDACTED]",
  "user":"[REDACTED]",
  "app":"no app in context",
  "method":"GET",
  "url":"/ocs/v2.php/apps/notifications/api/v2/notifications",
  "scriptName":"/ocs/v2.php",
  "message":"OCA\\Cospend\\Notification\\Notifier::prepare() threw \\InvalidArgumentException which is deprecated. Throw \\OCP\\Notification\\UnknownNotificationException when the notification is not known to your notifier and otherwise handle all \\InvalidArgumentException yourself.",
  "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:152.0) Gecko/20100101 Firefox/152.0",
  "version":"34.0.1.2",
  "data":[],
  "id":"6a5627c8c033c"
}

I am running NC 34.0.1 (docker), Cospend 4.0.2. I am not sure itf the methods should just be swapped of if there is a better solution to make Cospend not throw this exception anymore at all. There was a similar thing with "pantry", see here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions