Skip to content

Possible issues in getNodeWebhookPath when webhookId or path is undefined #15071

@nourahaddaoui

Description

@nourahaddaoui

Bug Description

While exploring how getNodeWebhookPath works, I noticed that it might not handle cases well when webhookId or path is undefined.
This could lead to unexpected webhook paths being generated, which might cause errors or strange behavior when handling webhooks.

To Reproduce

  1. Call getNodeWebhookPath without passing a webhookId or path, or pass undefined.
  2. Check the resulting webhookPath.
  3. See if the function breaks or returns something that doesn’t make sense.

Expected behavior

It would be better if the function could handle missing values more gracefully: maybe by throwing a clear error, returning a default, or avoiding bad webhook construction altogether.

Operating System

macOS Sonoma

n8n Version

1.90.2

Node.js Version

v20.18.0

Database

SQLite (default)

Execution mode

main (default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Releasedin linearIssue or PR has been created in Linear for internal review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions