Skip to content

🐛 Bug Report: Missing throttled property when using throttle step via bridge #9919

@lqmanh

Description

@lqmanh

📜 Description

In Novu dashboard, it shows this error:

{
  "url": "...",
  "statusCode": 400,
  "message": "Workflow with id: `direct-message` has an invalid state. Step with id: `throttle-step` has invalid result. Please provide the correct step result.",
  "code": "ExecutionStateResultInvalidError",
  "data": [
    {
      "path": "",
      "message": "must have required property 'throttled'"
    }
  ],
  "cause": {
    "name": "HTTPError",
    "code": "ERR_NON_2XX_3XX_RESPONSE",
    "timings": {
      ...
    }
  }
}

👟 Reproduction steps

  1. Set up code-based workflows with Novu framework as normal
  2. Set up bridge endpoint as normal
  3. Writing something like this in a workflow:
await step.throttle('throttle-step', async () => ({
    type: 'fixed',
    amount: 15,
    unit: 'minutes',
    threshold: 1,
    throttleKey: payload.conversationId,
  }));

👍 Expected behavior

Novu handles throttling without errors

👎 Actual Behavior with Screenshots

Image

Novu version

Novu SaaS

npm version

11.6.2

node version

24.12.0

📃 Provide any additional context for the Bug.

I've opened this PR myself, hope it helps: #9901

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions