Significant-Gravitas/AutoGPT · warning · HTTPException
Chat sharing is not enabled
Error message
Chat sharing is not enabled
What it means
HTTP 403 from the share-enable endpoint (backend/api/features/chat/share.py:117). Chat sharing is behind the `chat-sharing` feature flag checked per user via is_feature_enabled(Flag.CHAT_SHARING, user_id). When the flag is off for that user, the endpoint refuses with 403 so a stale frontend cannot enable shares after a rollback (per the docstring).
Source
Thrown at autogpt_platform/backend/backend/api/features/chat/share.py:117
@owner_router.post(
"/sessions/{session_id}/share",
responses={
403: {"description": "Chat sharing is not enabled for this user"},
404: {"description": "Chat session not found for user"},
},
)
async def enable_chat_sharing(
session_id: Annotated[str, Path],
user_id: Annotated[str, Security(auth.get_user_id)],
body: EnableShareRequest = Body(default_factory=EnableShareRequest),
) -> ShareResponse:
"""Enable sharing for a chat session.
Flag-gated: refuses with 403 when ``chat-sharing`` is off so a stale
frontend cannot enable shares post-rollback.
"""
if not await is_feature_enabled(Flag.CHAT_SHARING, user_id):
raise HTTPException(status_code=403, detail="Chat sharing is not enabled")
base_url = settings.config.frontend_base_url
if not base_url:
# Fail fast rather than handing the user a localhost URL that
# only works on the backend host. This catches deployment
# misconfigurations at share-enable time instead of silently
# shipping broken share URLs to end users.
logger.error("frontend_base_url is not configured; refusing to enable share")
raise HTTPException(
status_code=500, detail="Sharing is not configured on this deployment"
)
try:
share_token = await share_db.enable_chat_session_share(
session_id=session_id,
user_id=user_id,
auto_share_executions=body.auto_share_executions,
)View on GitHub (pinned to 9c8bb5550f)
Solutions
- Enable the chat-sharing flag for the user (or globally) in the feature-flag service, then retry.
- Client-side: gate the share button on the flag state fetched from the flags endpoint rather than hardcoding it.
- Treat 403 as permanent policy — do not retry; hide the share UI and possibly prompt a refresh to pick up rolled-back frontend assets.
Defensive patterns
Strategy: type-guard
Validate before calling
// check the flag before rendering share controls const flags = await getFeatureFlags(); if (!flags['chat-sharing']) hideShareButton();
Type guard
function chatSharingEnabled(flags: Record<string, boolean>): boolean {
return flags['chat-sharing'] === true;
} Try / catch
try { await post(`/chat/sessions/${id}/share/enable`); } catch (e) { if (e.status === 403) { hideShareUI(); return; } throw e; } Prevention
- Drive share UI visibility from the feature-flag service, not a hardcoded build flag
- On 403, drop the share affordance — it signals rollback/policy, not a transient fault
- During gradual rollouts, expect mixed 403s per user and handle them silently
When it happens
Trigger: POST to enable sharing for a session while the CHAT_SHARING flag is disabled globally or for that specific user (flag service decides per user_id).
Common situations: Feature rolled back but cached frontend still shows share buttons; gradual rollout where the user isn't in the enabled cohort; local/self-hosted deployment with the flag defaulted off; flag service misconfiguration.
Related errors
- Sharing is not configured on this deployment
- Rate limit reset is not available.
- Rate limit reset is not available (credit system is disabled
- No daily limit is configured — nothing to reset.
- Unable to verify reset eligibility — please try again later.
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/8983eec91e7af3cb.
Report an issue: GitHub.