mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 03:42:16 +00:00
fix(Structured Output Parser Node): Handle passed objects that do not match schema (#17774)
This commit is contained in:
@@ -66,7 +66,7 @@ export class N8nStructuredOutputParser extends StructuredOutputParser<
|
||||
if (e instanceof SyntaxError) {
|
||||
nodeError.context.outputParserFailReason = 'Invalid JSON in model output';
|
||||
} else if (
|
||||
text.trim() === '{}' ||
|
||||
(typeof text === 'string' && text.trim() === '{}') ||
|
||||
(e instanceof z.ZodError &&
|
||||
e.issues?.[0] &&
|
||||
e.issues?.[0].code === 'invalid_type' &&
|
||||
|
||||
Reference in New Issue
Block a user