{"record":{"id":"3cf673c4f083c4b1","repo":"different-ai/openwork","slug":"failed-to-cancel-invitation-response-status","errorCode":null,"errorMessage":"Failed to cancel invitation (${response.status}).","messagePattern":"Failed to cancel invitation \\((.+?)\\)\\.","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ee/apps/den-web/app/(den)/dashboard/_providers/org-dashboard-provider.tsx","lineNumber":669,"sourceCode":"      setMutationBusy(null);\n    }\n  }\n\n  async function cancelInvitation(invitationId: string) {\n    if (!getCurrentAccess().canCancelInvitations) {\n      throw new Error(\"Only workspace admins can cancel invitations.\");\n    }\n\n    await runMutation(\"cancel-invitation\", async () => {\n      ensureActiveOrganizationSelected();\n      const { response, payload } = await requestJson(\n        `/v1/invitations/${encodeURIComponent(invitationId)}/cancel`,\n        { method: \"POST\", body: JSON.stringify({}) },\n        12000,\n      );\n\n      if (!response.ok) {\n        throw getRequestError(payload, response, `Failed to cancel invitation (${response.status}).`);\n      }\n    });\n  }\n\n  async function updateMemberRole(memberId: string, role: string) {\n    if (!getCurrentAccess().canManageRoles) {\n      throw new Error(\"Only workspace owners and super-admins can change member roles.\");\n    }\n    ensureTargetIsNotOwner(memberId);\n    ensureRoleCanBeAssigned(role);\n\n    await runMutation(\"update-member-role\", async () => {\n      ensureActiveOrganizationSelected();\n      const { response, payload } = await requestJson(\n        `/v1/members/${encodeURIComponent(memberId)}/role`,\n        {\n          method: \"POST\",\n          body: JSON.stringify({ role }),","sourceCodeStart":651,"sourceCodeEnd":687,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/apps/den-web/app/(den)/dashboard/_providers/org-dashboard-provider.tsx#L651-L687","documentation":"Error \"Failed to cancel invitation (${response.status}).\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at ee/apps/den-web/app/(den)/dashboard/_providers/org-dashboard-provider.tsx:669 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}