NovuN
Novu3y ago
Rifki

AxiosError and Notifications not being sent

We are accessing the Novu API (Novu Web/Hosted Version) using the @Novu/node package and recently when we try to send bulk notifications we get this error:
AxiosError: Request failed with status code 400

2023-08-11T14:08:20.625 app[e784e33f900183] iad [info] at settle (/app/node_modules/@novu/node/node_modules/axios/lib/core/settle.js:19:12)

2023-08-11T14:08:20.625 app[e784e33f900183] iad [info] at IncomingMessage.handleStreamEnd (/app/node_modules/@novu/node/node_modules/axios/lib/adapters/http.js:497:11)

2023-08-11T14:08:20.625 app[e784e33f900183] iad [info] at IncomingMessage.emit (node:events:525:35)

2023-08-11T14:08:20.625 app[e784e33f900183] iad [info] at endReadableNT (node:internal/streams/readable:1358:12)

2023-08-11T14:08:20.625 app[e784e33f900183] iad [info] at processTicksAndRejections (node:internal/process/task_queues:83:21)

Normal triggered notifications aren't showing up on the activity feed either.
Bulk Trigger code
let eventsList: IBulkEvents[] = [];

  users.map((value, index) => {
    eventsList.push({
      name: "announcement-new-season",
      to: {
        subscriberId: value.id,
        email: value.email,
      },
      payload: {
        user_name: value.displayName,
        season_number: season.number,
        season_game: season.game,
      },
    });
  });
  await novu.bulkTrigger(eventsList);
  const data = { seasonId: season.id };

I also noticed that our @Novu/node package version is 0.14.0. Is the cause of this error due to our package being out of date?
Was this page helpful?