{"record":{"id":"5ad6d609a51ebaea","repo":"langflow-ai/langflow","slug":"missing-provider-data-for-provider-label","errorCode":null,"errorMessage":"Missing provider_data for {provider_label}.","messagePattern":"Missing provider_data for (.+?)\\.","errorType":"http","errorClass":"HTTPException","httpStatus":422,"severity":"warning","filePath":"src/backend/base/langflow/api/v1/mappers/deployments/base.py","lineNumber":976,"sourceCode":"        raw: Any,\n        outer_payload: Any | None = None,\n    ) -> Any:\n        \"\"\"Parse a user-supplied API payload, raising 422 on failure.\n\n        Use for data sent **by** the user in the API request (inbound).\n        Failures are input errors — the user can fix them.\n        ``slot_name`` is logged for debugging but not exposed to the user.\n        See ``parse_adapter_slot`` for adapter-boundary payloads.\n        \"\"\"\n        provider_label = self.get_provider_label()\n        if slot is None:\n            logger.error(\"Payload slot '%s' is not configured for %s\", slot_name, provider_label)\n            msg = f\"The {provider_label} integration is not configured for this operation.\"\n            raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=msg)\n        try:\n            parsed = slot.parse(raw)\n        except AdapterPayloadMissingError as exc:\n            raise HTTPException(\n                status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,\n                detail=f\"Missing provider_data for {provider_label}.\",\n            ) from exc\n        except AdapterPayloadValidationError as exc:\n            detail = exc.format_first_error()\n            raise HTTPException(\n                status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,\n                detail=f\"Invalid provider_data for {provider_label}: {detail}\",\n            ) from exc\n        if outer_payload is None:\n            return parsed\n        try:\n            self.validate_with_outer_request(parsed, outer_payload)\n        except OuterRequestValidationError as exc:\n            raise HTTPException(\n                status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,\n                detail=f\"Invalid provider_data for {provider_label}: {exc.detail}\",\n            ) from exc","sourceCodeStart":958,"sourceCodeEnd":994,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/v1/mappers/deployments/base.py#L958-L994","documentation":"422 from BaseDeploymentMapper.parse_api_request_slot when slot.parse raises AdapterPayloadMissingError: the request's provider_data is empty/absent for an operation that requires it. Unlike the adapter-side variants (455-457), this is a user-input error — the fix is in the request payload. The detail names the provider whose provider_data is missing.","triggerScenarios":"Creating/updating a deployment of a non-default provider without a provider_data field, with provider_data: null, or with an empty object where the provider's schema requires content (e.g. missing connection/region/config fields).","commonSituations":"Frontend skipping the provider-specific form step; API scripts copying a generic deployment body to a provider-specific endpoint; UI bug clearing the provider_data state on edit.","solutions":["Include a non-empty provider_data object matching the provider's expected schema in the request body","Fetch the provider's expected shape from the deployment create/update schema (or a working create request) and mirror it","Validate provider_data client-side before submit: present, non-null, non-empty"],"exampleFix":"# before\nawait client.post(\"/api/v1/deployments\", json={\"flow_id\": fid, \"deployment_type\": \"langflow\"})\n# after\nawait client.post(\"/api/v1/deployments\", json={\n    \"flow_id\": fid,\n    \"deployment_type\": provider_type,\n    \"provider_data\": {\"connection_id\": cid, \"region\": \"us-east-1\"},\n})","handlingStrategy":"validation","validationCode":"pd = body.get(\"provider_data\")\nif deployment_type != \"base\" and (pd is None or not pd.strip() if isinstance(pd, str) else not pd):\n    raise ValueError(f\"provider_data required for {deployment_type} deployments\")","typeGuard":"function hasProviderData(body: unknown): boolean {\n  const b = body as Record<string, unknown>;\n  const pd = b.provider_data;\n  return pd !== undefined && pd !== null &&\n    (typeof pd === \"object\" ? Object.keys(pd).length > 0 : String(pd).length > 0);\n}","tryCatchPattern":"try:\n    await client.post(\"/api/v1/deployments\", json=body)\nexcept httpx.HTTPStatusError as e:\n    if e.response.status_code == 422 and \"Missing provider_data\" in e.response.json()[\"detail\"]:\n        body[\"provider_data\"] = await fetch_default_provider_data(provider)\n        await client.post(\"/api/v1/deployments\", json=body)\n    else:\n        raise","preventionTips":["Require the provider-specific form step before submit in the deployment UI","Validate provider_data is present and non-empty client-side for non-default providers","Keep a captured working provider_data payload as a template for API scripts"],"tags":["deployment","provider","provider-data","http-422","validation","langflow"],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}