fix(core): Custom workflow tool tweaks (#8561)

This commit is contained in:
Michael Kret
2024-02-08 18:12:45 +02:00
committed by GitHub
parent e28b374170
commit ccc0ad5009
2 changed files with 32 additions and 22 deletions

View File

@@ -189,10 +189,9 @@ export class ToolCode implements INodeType {
if (typeof response !== 'string') {
// TODO: Do some more testing. Issues here should actually fail the workflow
executionError = new NodeOperationError(
this.getNode(),
`The code did not return a valid value. Instead of a string did a value of type '${typeof response}' get returned.`,
);
executionError = new NodeOperationError(this.getNode(), 'Wrong output type returned', {
description: `The response property should be a string, but it is an ${typeof response}`,
});
response = `There was an error: "${executionError.message}"`;
}