-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Better error when calling expression function on input that is undefined or null #10009
feat: Better error when calling expression function on input that is undefined or null #10009
Conversation
…filterifswitch-nodes-improve-output-panel-error-if-a-field
`${functionName}() could not be called on "${String(value)}" type`, | ||
{ | ||
description: | ||
'Likely you are accesing a field that does not exist, modify your expression or set a default value', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slight tweak
You are trying to access a field that does not exist, modify your expression or set a default value
@@ -242,4 +243,31 @@ describe('tmpl Expression Parser', () => { | |||
expect(evaluate('={{ $ifEmpty({a: 1}, "default") }}')).toEqual({ a: 1 }); | |||
}); | |||
}); | |||
|
|||
describe('Test estend with undefined', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo... extend
…filterifswitch-nodes-improve-output-panel-error-if-a-field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
2 flaky tests on run #5875 ↗︎
Details:
5-ndv.cy.ts • 1 flaky test
24-ndv-paired-item.cy.ts • 1 flaky test
Review all test suite changes for PR #10009 ↗︎ |
✅ All Cypress E2E specs passed |
Got released with |
Summary
before
after
error changed only for
null
andundefined
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/NODE-1454/filterifswitch-nodes-improve-output-panel-error-if-a-field-is-missing