{"record":{"id":"98fa2a2455d94f85","repo":"langflow-ai/langflow","slug":"share-not-found","errorCode":null,"errorMessage":"Share not found","messagePattern":"Share not found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"src/backend/base/langflow/api/v1/authz_shares.py","lineNumber":371,"sourceCode":"    is_team_member = row.target_id is not None and row.target_id in caller_team_ids\n    return _share_visible(\n        row=row,\n        user_id=user_id,\n        resource_owner_id=resource_owner_id,\n        is_team_member=is_team_member,\n    )\n\n\n@router.get(\"/{share_id}\", response_model=ShareRead)\nasync def get_share(\n    share_id: UUID,\n    current_user: CurrentActiveUser,\n    session: DbSession,\n) -> ShareRead:\n    \"\"\"Fetch a single share by id with the same visibility rules as list.\"\"\"\n    row = await session.get(AuthzShare, share_id)\n    if row is None:\n        raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=\"Share not found\")\n\n    owner_id = await _resolve_resource_owner(\n        session,\n        resource_type=row.resource_type,\n        resource_id=row.resource_id,\n    )\n    # See create_share: owner_id is the *resource* owner so non-owners are\n    # forced through ensure_share_permission's plugin enforce() path.\n    await ensure_share_permission(\n        current_user,\n        ShareAction.READ,\n        share_id=share_id,\n        share_user_id=owner_id,\n    )\n\n    if not getattr(current_user, \"is_superuser\", False) and not await _user_can_see_share(\n        session,\n        row=row,","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/v1/authz_shares.py#L353-L389","documentation":"Raised by GET /api/v1/authz/shares/{share_id} when session.get(AuthzShare, share_id) returns None — no share row exists with that UUID. Plain 404 from the share fetch endpoint; visibility-based 404s are handled separately.","triggerScenarios":"GET /authz/shares/{id} with a typo'd, stale, or already-deleted share id.","commonSituations":"Following a stale share link after the owner revoked it; share id from a different environment; client caching share ids past their lifetime.","solutions":["Re-list shares (GET /authz/shares with resource filters) to discover current share ids","Treat 404 as terminal — do not retry","Expire cached share references when the parent resource changes ownership or is deleted"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  return await getShare(shareId);\n} catch (e) {\n  if (e.status === 404) return null;\n  throw e;\n}","preventionTips":["Only use share ids returned by the list endpoint for the current user","Expire cached share ids when the underlying resource changes"],"tags":["authz","api","shares","not-found"],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}