Skip to content

Invalid property expression (n8n-style ${node}) bricks workflow node in editor #5273

Description

@ivicac

This was generated by AI during triage.

Bug

Typing an unresolvable expression into a property field — e.g. an n8n-style ${node} reference such as ${httpClient_1} used as an OBJECT property key — permanently breaks the workflow node in the editor.

Steps to reproduce

  1. Open a workflow node in the editor and add an OBJECT property.
  2. Enter an n8n-style expression (e.g. ${httpClient_1}) as the object property key.
  3. The node renders an error and is taken over by the editor ErrorBoundary.
  4. Clearing/correcting the field does not recover the node — the ErrorBoundary latches and only resets via its own button. The node stays dead until deleted and recreated.

Root cause

The property/datapill value lookups call object-resolve-path's resolvePath. For a path segment that isn't a valid identifier (the {/} left by ${...}), object-resolve-path throws path is not a valid object path.

These calls are best-effort "what is the current value at this path?" reads where an invalid or missing path should simply mean no value. Because the throw was unhandled, it escaped to the editor ErrorBoundary, which latches — so a transient bad keystroke bricked the node.

Affected call sites:

  • client/src/pages/platform/workflow-editor/components/datapills/DataPill.tsx
  • client/src/pages/platform/workflow-editor/components/properties/hooks/useArrayProperty.ts
  • client/src/pages/platform/workflow-editor/components/properties/hooks/useObjectProperty.ts
  • client/src/pages/platform/workflow-editor/components/properties/hooks/useProperty.ts

Fix

Add a non-throwing safeResolvePath wrapper in client/src/pages/platform/workflow-editor/utils/encodingUtils.ts (try/catch around resolvePath, returning undefined on failure) and route all property/datapill lookups through it. A bad expression then degrades to undefined instead of crashing the node. Covered by unit tests in encodingUtils.test.ts.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfrontendConcerning any and all frontend issues

Type

Fields

No fields configured for Bug.

Projects

Status
✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions