From e8bf9ea0585821b64488fadfabc1b3e4d49da09b Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 4 Feb 2024 17:22:50 +1100 Subject: [PATCH] fix(ui): do not swallow errors during schema parsing Unknown errors were swallowed during schema parsing. Now they log a warning. --- .../features/nodes/util/schema/parseSchema.ts | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/invokeai/frontend/web/src/features/nodes/util/schema/parseSchema.ts b/invokeai/frontend/web/src/features/nodes/util/schema/parseSchema.ts index cc7f6e040b..696e371ea6 100644 --- a/invokeai/frontend/web/src/features/nodes/util/schema/parseSchema.ts +++ b/invokeai/frontend/web/src/features/nodes/util/schema/parseSchema.ts @@ -124,6 +124,20 @@ export const parseSchema = ( message: e.message, }) ); + } else { + logger('nodes').warn( + { + node: type, + field: propertyName, + schema: parseify(property), + error: serializeError(e), + }, + t('nodes.inputFieldTypeParseError', { + node: type, + field: propertyName, + message: 'unknown error', + }) + ); } } @@ -203,6 +217,20 @@ export const parseSchema = ( message: e.message, }) ); + } else { + logger('nodes').warn( + { + node: type, + field: propertyName, + schema: parseify(property), + error: serializeError(e), + }, + t('nodes.outputFieldTypeParseError', { + node: type, + field: propertyName, + message: 'unknown error', + }) + ); } } return outputsAccumulator;