{"record":{"id":"4ab764b54d661e80","repo":"OpenBMB/ChatDev","slug":"expected-boolean","errorCode":null,"errorMessage":"expected boolean","messagePattern":"expected boolean","errorType":"validation","errorClass":"ConfigError","httpStatus":null,"severity":"error","filePath":"entity/configs/base.py","lineNumber":247,"sourceCode":"        raise ConfigError(\"expected non-empty string\", key_path)\n    return value\n\n\ndef optional_str(data: Mapping[str, Any], key: str, path: str) -> str | None:\n    value = data.get(key)\n    if value is None or value == \"\":\n        return None\n    key_path = f\"{path}.{key}\" if path else key\n    if not isinstance(value, str):\n        raise ConfigError(\"expected string\", key_path)\n    return value\n\n\ndef require_bool(data: Mapping[str, Any], key: str, path: str) -> bool:\n    value = data.get(key)\n    key_path = f\"{path}.{key}\" if path else key\n    if not isinstance(value, bool):\n        raise ConfigError(\"expected boolean\", key_path)\n    return value\n\n\ndef optional_bool(data: Mapping[str, Any], key: str, path: str, *, default: bool | None = None) -> bool | None:\n    if key not in data:\n        return default\n    value = data[key]\n    key_path = f\"{path}.{key}\" if path else key\n    if not isinstance(value, bool):\n        raise ConfigError(\"expected boolean\", key_path)\n    return value\n\n\ndef optional_dict(data: Mapping[str, Any], key: str, path: str) -> Dict[str, Any] | None:\n    if key not in data or data[key] is None:\n        return None\n    value = data[key]\n    key_path = f\"{path}.{key}\" if path else key","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/OpenBMB/ChatDev/blob/4fb2db0ea90375ce1059f44fe03ffbd191a7a169/entity/configs/base.py#L229-L265","documentation":"ValidationError raised when the parsed YAML document fails the server's check_config schema validation. The aggregated error list is embedded in the message so the client sees exactly which structural rules failed.","triggerScenarios":"Uploading syntactically valid YAML that violates the workflow schema: missing required graph keys, wrong node/edge structure, invalid field types — anything check_config reports.","commonSituations":"Hand-writing workflows without the schema at hand; version drift after the workflow schema changed; converting workflows from another format that drops required fields.","solutions":["Read the embedded errors list in the message; each item names the failing rule.","Fix the YAML structure per the errors and re-upload.","Validate against check_config (or the published workflow schema) locally before uploading."],"exampleFix":"# before\ngraph:\n  nodes: {}\n# after (per reported errors, e.g. nodes must be a list)\ngraph:\n  nodes:\n    - id: start","handlingStrategy":"validation","validationCode":"const doc = jsYaml.load(content);\nconst errors = await localCheckConfig(doc); // mirror server schema\nif (errors.length) showErrors(errors);","typeGuard":null,"tryCatchPattern":"catch (e) { if (/YAML validation errors/.test(e.detail)) displayErrorList(e.detail); }","preventionTips":["Validate against the same schema locally before upload","Show embedded error list to authors for fast iteration"],"tags":["workflow","yaml","schema-validation"],"backgroundTag":"schema-validation-failed","analyzedSha":"4fb2db0ea90375ce1059f44fe03ffbd191a7a169","analyzedAt":"2026-08-27T14:35:29.622Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}