OpenBMB/ChatDev · error · DesignError

Design file not found: {config_path}

Error message

Design file not found: {config_path}

What it means

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.

Source

Thrown at check/check.py:63

                if legacy_key in agent_cfg:
                    raise DesignError(
                        f"'{legacy_key}' is deprecated. Use the new graph-level memory stores for node '{nid}'."
                    )


def load_config(
    config_path: Path,
    *,
    fn_module: Optional[str] = None,
    set_defaults: bool = True,
    vars_override: Optional[Dict[str, Any]] = None,
) -> DesignConfig:
    """Load, validate, and sanity-check a workflow file."""

    try:
        raw_data = read_yaml(config_path)
    except FileNotFoundError as exc:
        raise DesignError(f"Design file not found: {config_path}") from exc

    if not isinstance(raw_data, dict):
        raise DesignError("YAML root must be a mapping")

    if vars_override:
        merged_vars = dict(raw_data.get("vars") or {})
        merged_vars.update(vars_override)
        raw_data = dict(raw_data)
        raw_data["vars"] = merged_vars

    data = prepare_design_mapping(raw_data, source=str(config_path))

    schema_errors = validate_design(data, set_defaults=set_defaults, fn_module_ref=fn_module)
    if schema_errors:
        formatted = "\n".join(f"- {err}" for err in schema_errors)
        raise DesignError(f"Design validation failed for '{config_path}':\n{formatted}")

    try:

View on GitHub (pinned to 4fb2db0ea9)

Solutions

  1. Confirm the session is connected (reconnect if needed) before uploading.
  2. Inspect server logs for the original ValidationError details since the 400 message is generic.
  3. Reproduce with a minimal valid file to rule out file-level validation failures.
  4. Consider patching the route to propagate str(exc) from the ValidationError for accurate messages.

Example fix

# before (route)
except ValidationError:
    raise HTTPException(status_code=400, detail="Session not connected")
# after
except ValidationError as exc:
    raise HTTPException(status_code=400, detail=str(exc))
Defensive patterns

Strategy: retry

Validate before calling

// verify session connectivity via the session status endpoint before uploading

Try / catch

catch (e) { if (e.status === 400) { reconnect(sessionId).then(() => retryUpload()) } }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of OpenBMB/ChatDev@4fb2db0ea9 (2026-08-27). Data as JSON: /api/errors/1a5c5a187617314e. Report an issue: GitHub.