{"record":{"id":"9564c29591525bfd","repo":"Significant-Gravitas/AutoGPT","slug":"shared-execution-not-found","errorCode":null,"errorMessage":"Shared execution not found","messagePattern":"Shared execution not found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/v1.py","lineNumber":2354,"sourceCode":"            is_shared=False,\n            share_token=None,\n            shared_at=None,\n        )\n    except NotFoundError as exc:\n        raise HTTPException(status_code=404, detail=str(exc))\n\n\n@v1_router.get(\"/public/shared/{share_token}\")\nasync def get_shared_execution(\n    share_token: Annotated[\n        str,\n        Path(pattern=SHARE_TOKEN_PATTERN),\n    ],\n) -> execution_db.SharedExecutionResponse:\n    \"\"\"Get a shared graph execution by share token (no auth required).\"\"\"\n    execution = await execution_db.get_graph_execution_by_share_token(share_token)\n    if not execution:\n        raise HTTPException(status_code=404, detail=\"Shared execution not found\")\n\n    return execution\n\n\n@v1_router.get(\n    \"/public/shared/{share_token}/files/{file_id}/download\",\n    summary=\"Download a file from a shared execution\",\n    operation_id=\"download_shared_file\",\n    tags=[\"graphs\"],\n)\nasync def download_shared_file(\n    share_token: Annotated[\n        str,\n        Path(pattern=SHARE_TOKEN_PATTERN),\n    ],\n    file_id: Annotated[\n        str,\n        Path(pattern=SHARE_TOKEN_PATTERN),","sourceCodeStart":2336,"sourceCodeEnd":2372,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/v1.py#L2336-L2372","documentation":"Public, unauthenticated endpoint GET /v1/public/shared/{share_token} returned 404 because `get_graph_execution_by_share_token(share_token)` found no shared execution with that token. The token must match SHARE_TOKEN_PATTERN at the path-validation layer and exist as an active share; revoked or never-created tokens look identical to malformed ones.","triggerScenarios":"Opening {frontend_base_url}/share/{share_token} (or calling GET /v1/public/shared/{token}) with a typo'd token, a token whose sharing was disabled (share_token set to NULL), or a token from a different environment/database.","commonSituations":"User un-shared (disable_execution_sharing set share_token=None) but a recipient still has the old link; links copied between staging and production; truncated or URL-mangled tokens.","solutions":["Ask the owner to re-enable sharing and send the fresh link — tokens are regenerated per share.","Verify the token was copied whole (no whitespace/truncation) and matches the environment the link came from.","Owners: re-check that sharing is still enabled on the execution if the link suddenly stops working."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const SHARE_TOKEN_RE = /^[A-Za-z0-9_-]{16,}$/; // mirror SHARE_TOKEN_PATTERN\nfunction isPlausibleShareToken(t: string): boolean {\n  return SHARE_TOKEN_RE.test(t.trim());\n}","typeGuard":"function isPlausibleShareToken(t: string): boolean {\n  return typeof t === 'string' && /^[A-Za-z0-9_-]{16,}$/.test(t.trim());\n}","tryCatchPattern":"try {\n  const shared = await api.getSharedExecution(token);\n  return { ok: true, shared };\n} catch (e) {\n  if (e.status === 404) return { ok: false, reason: 'expired-or-invalid' };\n  throw e;\n}","preventionTips":["Never hand-edit share URLs; copy them from the share dialog verbatim.","Validate token shape before fetching to give a clearer 'bad link' message.","Owners: re-share to generate a fresh token instead of reusing old links after disabling."],"tags":["http-404","public-endpoint","share-token","sharing"],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}