Skip to content
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

Throwing NodeApiError prevents subsequent nodes accessing the Schema validation messages #1

Open
russell-hutson-jp opened this issue Apr 11, 2024 · 0 comments

Comments

@russell-hutson-jp
Copy link

Hi

If some JSON fails validation against a the given Schema, you should not throw a NodeApiError as this stops the execution. Do data is passed onto the next node.

It would be best if this could pass the error out on an Error branch and not throw a 400

image

A subsequent node connected to the error branch could interrogate the "instancePath", "keyword", "message" etc, and handle the error.
This would be great when used in conjunction with Webhook nodes to validate POST bodies and return meaningful error responses.

See also https://community.n8n.io/t/using-n8n-nodes-data-validation/44093

thanks in advance

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

No branches or pull requests

1 participant