fix(Text Classifier Node): Return error for empty inputText (#15390)

This commit is contained in:
Benjamin Schroth
2025-05-14 16:40:51 +02:00
committed by GitHub
parent 8717ad7821
commit 71e5584d28
4 changed files with 344 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ export async function processItem(
): Promise<Record<string, unknown>> {
const input = ctx.getNodeParameter('inputText', itemIndex) as string;
if (input === undefined || input === null) {
if (!input) {
throw new NodeOperationError(
ctx.getNode(),
`Text to classify for item ${itemIndex} is not defined`,