diff --git a/server/src/routes/plugins.ts b/server/src/routes/plugins.ts index a2b9abe75da..909d2ce5a3b 100644 --- a/server/src/routes/plugins.ts +++ b/server/src/routes/plugins.ts @@ -2653,7 +2653,7 @@ export function pluginRoutes( supported: true, valid: false, warningCount: 0, - errorCount: validation.errors.length, + errorCount: validation.errors?.length ?? 0, secretRefCount: 0, configKeyCount: Object.keys(body.configJson).length, outcome: "schema_validation_failed",