{"record":{"id":"7550fa479ea7ddc0","repo":"OpenBMB/ChatDev","slug":"yaml-root-must-be-a-mapping","errorCode":null,"errorMessage":"YAML root must be a mapping","messagePattern":"YAML root must be a mapping","errorType":"validation","errorClass":"DesignError","httpStatus":null,"severity":"error","filePath":"check/check.py","lineNumber":66,"sourceCode":"                    )\n\n\ndef load_config(\n    config_path: Path,\n    *,\n    fn_module: Optional[str] = None,\n    set_defaults: bool = True,\n    vars_override: Optional[Dict[str, Any]] = None,\n) -> DesignConfig:\n    \"\"\"Load, validate, and sanity-check a workflow file.\"\"\"\n\n    try:\n        raw_data = read_yaml(config_path)\n    except FileNotFoundError as exc:\n        raise DesignError(f\"Design file not found: {config_path}\") from exc\n\n    if not isinstance(raw_data, dict):\n        raise DesignError(\"YAML root must be a mapping\")\n\n    if vars_override:\n        merged_vars = dict(raw_data.get(\"vars\") or {})\n        merged_vars.update(vars_override)\n        raw_data = dict(raw_data)\n        raw_data[\"vars\"] = merged_vars\n\n    data = prepare_design_mapping(raw_data, source=str(config_path))\n\n    schema_errors = validate_design(data, set_defaults=set_defaults, fn_module_ref=fn_module)\n    if schema_errors:\n        formatted = \"\\n\".join(f\"- {err}\" for err in schema_errors)\n        raise DesignError(f\"Design validation failed for '{config_path}':\\n{formatted}\")\n\n    try:\n        design = DesignConfig.from_dict(data, path=\"root\")\n    except ConfigError as exc:\n        raise DesignError(f\"Design parsing failed for '{config_path}': {exc}\") from exc","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/OpenBMB/ChatDev/blob/4fb2db0ea90375ce1059f44fe03ffbd191a7a169/check/check.py#L48-L84","documentation":"500 raised by the attachment upload endpoint when save_upload_file throws a non-validation exception (disk full, permission denied, storage backend outage). The original exception is logged with the session id before the generic message is returned.","triggerScenarios":"Filesystem permission errors on the upload directory, disk exhaustion, or unexpected bugs in the attachment service while POSTing a multipart file to /api/uploads/{session_id}.","commonSituations":"Server runs as a user without write access to the storage dir; container with a full volume; NFS/S3-backed storage temporarily unavailable.","solutions":["Check server logs for the logged 'Failed to save attachment' entry with the real error string.","Verify write permissions and free space on the upload storage directory.","If storage is remote, verify connectivity/credentials and retry the upload."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"catch (e) { if (e.status === 500 && /attachment/i.test(e.detail)) notifyUser('storage issue, contact admin') }","preventionTips":["Monitor disk space on upload volumes","Ensure server process owns the upload dir"],"tags":["upload","storage","internal-error","fastapi"],"backgroundTag":"file-upload-failed","analyzedSha":"4fb2db0ea90375ce1059f44fe03ffbd191a7a169","analyzedAt":"2026-08-27T14:35:29.622Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}