{"record":{"id":"1a5c5a187617314e","repo":"OpenBMB/ChatDev","slug":"design-file-not-found-config-path","errorCode":null,"errorMessage":"Design file not found: {config_path}","messagePattern":"Design file not found: (.+?)","errorType":"exception","errorClass":"DesignError","httpStatus":null,"severity":"error","filePath":"check/check.py","lineNumber":63,"sourceCode":"                if legacy_key in agent_cfg:\n                    raise DesignError(\n                        f\"'{legacy_key}' is deprecated. Use the new graph-level memory stores for node '{nid}'.\"\n                    )\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:","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/OpenBMB/ChatDev/blob/4fb2db0ea90375ce1059f44fe03ffbd191a7a169/check/check.py#L45-L81","documentation":"Misleading 400 returned by the attachment upload endpoint when the underlying attachment_service.save_upload_file raises a ValidationError. Despite the message 'Session not connected', the actual cause is any validation failure while saving the upload for that session.","triggerScenarios":"POST an attachment to a session that is not connected, or where the file fails validation (empty file, bad name, size limits) inside attachment_service.save_upload_file; any ValidationError from the service is collapsed into this message.","commonSituations":"Uploading to a session ID after the connection dropped; uploading before session handshake completes; file metadata that fails service-level validation but the client only sees the generic message.","solutions":["Confirm the session is connected (reconnect if needed) before uploading.","Inspect server logs for the original ValidationError details since the 400 message is generic.","Reproduce with a minimal valid file to rule out file-level validation failures.","Consider patching the route to propagate str(exc) from the ValidationError for accurate messages."],"exampleFix":"# before (route)\nexcept ValidationError:\n    raise HTTPException(status_code=400, detail=\"Session not connected\")\n# after\nexcept ValidationError as exc:\n    raise HTTPException(status_code=400, detail=str(exc))","handlingStrategy":"retry","validationCode":"// verify session connectivity via the session status endpoint before uploading","typeGuard":null,"tryCatchPattern":"catch (e) { if (e.status === 400) { reconnect(sessionId).then(() => retryUpload()) } }","preventionTips":["Reconnect before uploading after idle","Check server log for the real ValidationError"],"tags":["upload","session","validation","fastapi"],"backgroundTag":"session-not-connected","analyzedSha":"4fb2db0ea90375ce1059f44fe03ffbd191a7a169","analyzedAt":"2026-08-27T14:35:29.622Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}