langflow-ai/langflow · error · HTTPException
Share not found
Error message
Share not found
What it means
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.
Source
Thrown at src/backend/base/langflow/api/v1/authz_shares.py:371
is_team_member = row.target_id is not None and row.target_id in caller_team_ids
return _share_visible(
row=row,
user_id=user_id,
resource_owner_id=resource_owner_id,
is_team_member=is_team_member,
)
@router.get("/{share_id}", response_model=ShareRead)
async def get_share(
share_id: UUID,
current_user: CurrentActiveUser,
session: DbSession,
) -> ShareRead:
"""Fetch a single share by id with the same visibility rules as list."""
row = await session.get(AuthzShare, share_id)
if row is None:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="Share not found")
owner_id = await _resolve_resource_owner(
session,
resource_type=row.resource_type,
resource_id=row.resource_id,
)
# See create_share: owner_id is the *resource* owner so non-owners are
# forced through ensure_share_permission's plugin enforce() path.
await ensure_share_permission(
current_user,
ShareAction.READ,
share_id=share_id,
share_user_id=owner_id,
)
if not getattr(current_user, "is_superuser", False) and not await _user_can_see_share(
session,
row=row,View on GitHub (pinned to 976ec789d2)
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
Defensive patterns
Strategy: try-catch
Try / catch
try {
return await getShare(shareId);
} catch (e) {
if (e.status === 404) return null;
throw e;
} Prevention
- Only use share ids returned by the list endpoint for the current user
- Expire cached share ids when the underlying resource changes
When it happens
Trigger: GET /authz/shares/{id} with a typo'd, stale, or already-deleted share id.
Common situations: Following a stale share link after the owner revoked it; share id from a different environment; client caching share ids past their lifetime.
Related errors
- Resource not found
- Flow not found
- Only the resource owner or a superuser may administer shares
- Share could not be created: it may already exist or conflict
- Unknown scope {scope!r}
AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14).
Data as JSON: /api/errors/98fa2a2455d94f85.
Report an issue: GitHub.