langflow-ai/langflow · error · HTTPException
Missing deployment name while shaping wxO deployment metadat
Error message
Missing deployment name while shaping wxO deployment metadata.
What it means
Raised by WatsonxOrchestrateMapper.shape_deployment_get_data when the caller does not pass a deployment name while building the GET /deployments/{id} response for a watsonx_orchestrate deployment. The name is a required field of WatsonxApiDeploymentGetProviderData, so the mapper refuses to shape metadata without it and returns HTTP 500. It is an internal invariant violation (caller-side bug or a deployment row lacking a name), not a client payload problem.
Source
Thrown at src/backend/base/langflow/api/v1/mappers/deployments/watsonx_orchestrate/mapper.py:1525
"created_at": item.created_at,
"updated_at": item.updated_at,
}
def shape_deployment_get_data(
self,
provider_data: AdapterPayload | None,
*,
name: str | None = None,
) -> dict[str, Any] | None:
parsed = self.parse_adapter_slot(
slot=WXO_ADAPTER_PAYLOAD_SCHEMAS.deployment_item_data,
slot_name="deployment_item_data",
raw=provider_data,
operation="reading deployment metadata",
)
if name is None:
msg = "Missing deployment name while shaping wxO deployment metadata."
raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=msg)
return WatsonxApiDeploymentGetProviderData(
llm=parsed.llm,
name=name,
display_name=parsed.display_name,
environments=parsed.environments,
).model_dump(mode="json")
def shape_config_item_data(self, provider_data: dict[str, Any]) -> WatsonxApiConfigListItem:
return self.parse_adapter_slot(
slot=self.api_payloads.config_item_data,
slot_name="config_item_data",
raw=provider_data,
operation="reading the configuration",
)
def _to_bind_provider_operation(self, *, raw_name: str, app_ids: list[str]) -> AdapterPayload:
return {
"op": "bind",View on GitHub (pinned to 976ec789d2)
Solutions
- Check the deployment DB row / adapter response that produced the request and confirm the deployment actually has a name; if NULL, fix the data or re-create the deployment through the API.
- If you are calling shape_deployment_get_data from your own code, always pass a non-None name (e.g. name=item.name or deployment.name).
- If the name legitimately comes from the provider response and can be absent, decide on a fallback (use id) or surface a 404 instead — but as shipped, a 500 here means the caller contract was broken.
- Report as a Langflow bug if it occurs on a stock GET /api/v1/deployments/{id} with a normally-created wxO deployment.
Example fix
// before await mapper.shape_deployment_get_data(provider_data) # name defaults to None -> 500 # after await mapper.shape_deployment_get_data(provider_data, name=deployment.name)
Defensive patterns
Strategy: validation
Validate before calling
// caller of shape_deployment_get_data
if name is None or not name.strip():
raise ValueError("deployment name is required before shaping wxO GET data")
data = mapper.shape_deployment_get_data(provider_data, name=name) Type guard
def has_deployment_name(item: object) -> bool:
return isinstance(getattr(item, "name", None), str) and bool(item.name.strip()) Try / catch
try:
data = mapper.shape_deployment_get_data(provider_data, name=name)
except HTTPException as e:
if e.status_code == 500 and "Missing deployment name" in e.detail:
log.error("deployment %s has no name; data integrity issue", deployment_id)
raise Prevention
- Always pass a validated non-empty name kwarg when shaping wxO deployment GET data.
- Enforce NOT NULL on deployment name at creation time so rows never lack a name.
- Add a regression test asserting every route that reads a wxO deployment forwards the name.
When it happens
Trigger: GET a watsonx_orchestrate deployment whose route handler calls shape_deployment_get_data(provider_data, name=None) — e.g. the deployment DB row or adapter item has no name, or a new call path forgets to forward the name kwarg.
Common situations: Extending the deployments API and adding a new caller of shape_deployment_get_data without passing name; a deployment record created by an older version or by direct DB insert where the name column is NULL; adapter list/get responses that omit the name field.
Related errors
- Created snapshot binding has empty tool_id={binding.tool_id!
- Created snapshot binding has non-UUID source_ref={source_ref
- Flow creation failed.
- Cannot resolve provider snapshot ids for flow_version_ids in
- Cannot resolve provider snapshot ids for flow_version_ids in
AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14).
Data as JSON: /api/errors/6d574b42c8b2050f.
Report an issue: GitHub.