{"record":{"id":"adb2b344ee66fac5","repo":"langflow-ai/langflow","slug":"session-session-id-not-found","errorCode":null,"errorMessage":"Session {session_id} not found","messagePattern":"Session (.+?) not found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"src/backend/base/langflow/api/v1/endpoints.py","lineNumber":1175,"sourceCode":"        folder_id=flow.folder_id,\n    )\n\n    session_service = get_session_service()\n    flow_id_str = str(flow.id)\n    if outputs is None:\n        outputs = []\n    if inputs is None:\n        inputs = [InputValueRequest(components=[], input_value=\"\")]\n\n    if session_id:\n        try:\n            session_data = await session_service.load_session(session_id, flow_id=flow_id_str)\n        except Exception as exc:\n            raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(exc)) from exc\n        graph, _artifacts = session_data or (None, None)\n        if graph is None:\n            msg = f\"Session {session_id} not found\"\n            raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=msg)\n    else:\n        try:\n            # Get the flow that matches the flow_id and belongs to the user\n            # flow = session.query(Flow).filter(Flow.id == flow_id).filter(Flow.user_id == api_key_user.id).first()\n            stmt = select(Flow).where(Flow.id == flow.id).where(Flow.user_id == api_key_user.id)\n            flow = (await session.exec(stmt)).first()\n        except sa.exc.StatementError as exc:\n            # StatementError('(builtins.ValueError) badly formed hexadecimal UUID string')\n            if \"badly formed hexadecimal UUID string\" in str(exc):\n                await logger.aerror(f\"Flow ID {flow_id_str} is not a valid UUID\")\n                # This means the Flow ID is not a valid UUID which means it can't find the flow\n                raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=str(exc)) from exc\n            raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(exc)) from exc\n        except Exception as exc:\n            raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(exc)) from exc\n\n        if flow is None:\n            msg = f\"Flow {flow_id_str} not found\"","sourceCodeStart":1157,"sourceCodeEnd":1193,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/v1/endpoints.py#L1157-L1193","documentation":"Error \"Session {session_id} not found\" thrown in langflow-ai/langflow.","triggerScenarios":"Occurs when the session_id supplied in the request does not match any stored session for the flow, e.g. after session expiry or a typo.","commonSituations":"See trigger scenarios.","solutions":["Verify the session_id exists; sessions expire, so start a new session if needed.","Ensure you are querying the session with the same user that created it."],"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"}