{"record":{"id":"3cc8915007ac7355","repo":"Significant-Gravitas/AutoGPT","slug":"not-a-member-of-this-organization","errorCode":null,"errorMessage":"Not a member of this organization","messagePattern":"Not a member of this organization","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/orgs/invitation_routes.py","lineNumber":29,"sourceCode":"from prisma.errors import UniqueViolationError\n\nfrom backend.data.db import prisma\nfrom backend.util.exceptions import NotFoundError\n\nfrom . import db as org_db\nfrom .model import CreateInvitationRequest, InvitationCreateResponse, InvitationResponse\n\nlogger = logging.getLogger(__name__)\n\nrouter = APIRouter()\n\nINVITATION_TTL_DAYS = 7\n\n\ndef _verify_org_path(ctx: RequestContext, org_id: str) -> None:\n    \"\"\"Ensure the authenticated user's active org matches the path parameter.\"\"\"\n    if ctx.org_id != org_id:\n        raise HTTPException(403, detail=\"Not a member of this organization\")\n\n\n# --- Org-scoped invitation endpoints (under /api/orgs/{org_id}/invitations) ---\n\norg_router = APIRouter()\n\n\n@org_router.post(\n    \"\",\n    summary=\"Create invitation\",\n    tags=[\"orgs\", \"invitations\"],\n)\nasync def create_invitation(\n    org_id: str,\n    request: CreateInvitationRequest,\n    ctx: Annotated[\n        RequestContext,\n        Security(requires_org_permission(OrgAction.MANAGE_MEMBERS)),","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/orgs/invitation_routes.py#L11-L47","documentation":"Error \"Not a member of this organization\" thrown in Significant-Gravitas/AutoGPT.","triggerScenarios":"Thrown at autogpt_platform/backend/backend/api/features/orgs/invitation_routes.py:29 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Sign in with an account that is a member of this organization.","Ask an org admin to invite you to the organization."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}