Skip to content

Conversation

@majiayu000
Copy link

Summary

  • Uses getInstanceBaseUrl() instead of getWebhookBaseUrl() for workflow execution URLs in error context data
  • Ensures instanceBaseUrl in additional data uses the editor URL, not webhook URL
  • Fixes links to workflows and past executions when webhook and editor URLs differ

Test plan

  • Unit tests added for executeErrorWorkflow to verify correct URL construction
  • Updated existing tests for getBase to verify instanceBaseUrl uses editor URL
  • All existing tests pass
  • TypeScript checks pass
  • Linting passes

Fixes #22285

When n8n is configured with different webhook and editor URLs,
workflow URLs in error trigger context data and instanceBaseUrl
were incorrectly using the webhook URL instead of the editor URL.

This caused links to workflows and past executions to be unusable
when accessing from the editor UI.

Changes:
- Use getInstanceBaseUrl() instead of getWebhookBaseUrl() for
  pastExecutionUrl in execute-error-workflow.ts
- Use getInstanceBaseUrl() for instanceBaseUrl in
  workflow-execute-additional-data.ts

Fixes n8n-io#22285

Signed-off-by: majiayu000 <majiayu000@gmail.com>
Signed-off-by: majiayu000 <1835304752@qq.com>
@CLAassistant
Copy link

CLAassistant commented Dec 25, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workflow and past execution urls in context data use webhook url instead of editor url

2 participants