Error with `subscribers/{subscriberId}/messages/mark-all`
I'm using Novu Framework with Express and tried to test an endpoint locally that uses the
novu.subscribers.markAllMessagesAs()
. I tried marking all the messages as "read"
, but I got a 500 status code in the response with a server error message. All my other endpoints work.
Local environment:
MacOS 15.3.1
24 GB RAM
npm v10.9.0
Node v23.3.0
ngrok to expose bridge endpoint
The error says to reach out to support and give them the errorId: "ed7a58b8f29642a5b14ba1c691b6307d"
Thanks for your help!


5 Replies
@Dara
Its a bit strange, you are using this method,
novu.subscribers.markAllMessagesAs()
but in first screenshot, api is different
by any chance, you are calling markMessageRead
method instead?I got it to work, but I am not sure why my solution works.
I have another endpoint that is calls
markMessageRead
, but I was not testing that one. But when I commented it out, the markAllMessagesAs
endpoint worked in Postman. Maybe it has to do with how I've defined the endpoints in my API?
markMessageRead
: "/api/subscribers/:id/messages/:messageId"
markAllMessagesAs
: "api/subscribers/:id/messages/mark-all"
Any light you can shed on this would be appreciated!
OK, when I have the code for the
markAllMessagesAs
endpoint BEFORE the markMessageRead
endpoint in server.ts
, it works. I have no idea why.
@Dara
It is related to how express handles api routes. I think it is not related to novu
It would seem so. Thanks.