mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Improve handling of incorrect return data of Function Nodes
This commit is contained in:
@@ -92,6 +92,11 @@ export class FunctionItem implements INodeType {
|
||||
return Promise.reject(e);
|
||||
}
|
||||
|
||||
// Do very basic validation of the data
|
||||
if (jsonData === undefined) {
|
||||
throw new Error('No data got returned. Always an object has to be returned!');
|
||||
}
|
||||
|
||||
return {
|
||||
json: jsonData
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user