mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-06 21:50:05 +00:00
Reduce loglevel on node def validation (#295)
* Lower the loglevel of node def validation messages * Fix tests
This commit is contained in:
@@ -249,11 +249,17 @@ class ComfyApi extends EventTarget {
|
||||
const objectInfoUnsafe = await resp.json()
|
||||
const objectInfo: Record<string, ComfyNodeDef> = {}
|
||||
for (const key in objectInfoUnsafe) {
|
||||
try {
|
||||
objectInfo[key] = validateComfyNodeDef(objectInfoUnsafe[key])
|
||||
} catch (e) {
|
||||
console.warn('Ignore node definition: ', key)
|
||||
console.error(e)
|
||||
const validatedDef = await validateComfyNodeDef(
|
||||
objectInfoUnsafe[key],
|
||||
/* onError=*/ (errorMessage: string) => {
|
||||
console.warn(
|
||||
`Skipping invalid node definition: ${key}. See debug log for more information.`
|
||||
)
|
||||
console.debug(errorMessage)
|
||||
}
|
||||
)
|
||||
if (validatedDef !== null) {
|
||||
objectInfo[key] = validatedDef
|
||||
}
|
||||
}
|
||||
return objectInfo
|
||||
|
||||
Reference in New Issue
Block a user