{"record":{"id":"352eec87c0fbe64f","repo":"langflow-ai/langflow","slug":"unexpected-source-ref-in-create-snapshot-bindings","errorCode":null,"errorMessage":"Unexpected source_ref in create snapshot bindings: {source_ref}","messagePattern":"Unexpected source_ref in create snapshot bindings: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"src/backend/base/langflow/api/v1/mappers/deployments/helpers.py","lineNumber":574,"sourceCode":"    bindings_by_source_ref = bindings.to_source_ref_map()\n    if not bindings_by_source_ref:\n        msg = \"Deployment provider create result is missing required snapshot bindings.\"\n        raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=msg)\n    expected_source_ref_to_flow_version_id = {\n        str(flow_version_id): flow_version_id for flow_version_id in flow_version_ids\n    }\n    if len(bindings_by_source_ref) != len(expected_source_ref_to_flow_version_id):\n        msg = (\n            f\"Snapshot binding count mismatch on create: {len(expected_source_ref_to_flow_version_id)} \"\n            f\"flow versions vs {len(bindings_by_source_ref)} snapshot bindings\"\n        )\n        raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=msg)\n    snapshot_id_by_flow_version_id: dict[UUID, str] = {}\n    for source_ref, snapshot_id in bindings_by_source_ref.items():\n        flow_version_id = expected_source_ref_to_flow_version_id.get(source_ref)\n        if flow_version_id is None:\n            msg = f\"Unexpected source_ref in create snapshot bindings: {source_ref}\"\n            raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=msg)\n        snapshot_id_by_flow_version_id[flow_version_id] = snapshot_id\n    return snapshot_id_by_flow_version_id\n\n\ndef resolve_flow_version_patch_for_update(\n    *,\n    deployment_mapper: BaseDeploymentMapper,\n    payload: DeploymentUpdateRequest,\n) -> tuple[list[UUID], list[UUID]]:\n    patch = deployment_mapper.util_flow_version_patch(payload)\n    return patch.add_flow_version_ids, patch.remove_flow_version_ids\n\n\nasync def rollback_provider_create(\n    *,\n    deployment_adapter: DeploymentServiceProtocol,\n    provider_id: UUID,\n    resource_id: object,","sourceCodeStart":556,"sourceCodeEnd":592,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/v1/mappers/deployments/helpers.py#L556-L592","documentation":"Error \"Unexpected source_ref in create snapshot bindings: {source_ref}\" thrown in langflow-ai/langflow.","triggerScenarios":"Occurs when a create-time snapshot binding contains a source_ref that does not correspond to any attached flow version.","commonSituations":"See trigger scenarios.","solutions":["Check the provider create response; a snapshot binding references an unexpected source_ref. Retry or report the provider integration issue."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}