{"record":{"id":"9f58aeaf15014125","repo":"Kong/insomnia","slug":"failed-to-unlink-team-from-organization","errorCode":null,"errorMessage":"Failed to unlink team from organization","messagePattern":"Failed to unlink team from organization","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia/src/ui/components/modals/invite-modal/invite-modal.tsx","lineNumber":717,"sourceCode":"export async function getCurrentUserRoleInOrg(organizationId: string): Promise<Role> {\n  return getOrganizationMemberRoles({\n    organizationId,\n    sessionId: await getCurrentSessionId(),\n    userId: await getAccountId(),\n  }).catch(() => {\n    throw new Error('Failed to fetch member roles');\n  });\n}\n\nasync function unlinkTeam(organizationId: string, collaboratorId: string) {\n  try {\n    return await unlinkCollaborator({\n      organizationId,\n      collaboratorId,\n      sessionId: await getCurrentSessionId(),\n    });\n  } catch (error) {\n    throw new Error(error ?? 'Failed to unlink team from organization');\n  }\n}\n\nasync function revokeOrganizationInvite(organizationId: string, invitationId: string) {\n  try {\n    return revokeInvitation({\n      organizationId,\n      invitationId,\n      sessionId: await getCurrentSessionId(),\n    });\n  } catch (error) {\n    throw new Error(error instanceof Error ? error.message : 'Failed to revoke invitation from organization');\n  }\n}\n","sourceCodeStart":699,"sourceCodeEnd":732,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia/src/ui/components/modals/invite-modal/invite-modal.tsx#L699-L732","documentation":"Error \"Failed to unlink team from organization\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia/src/ui/components/modals/invite-modal/invite-modal.tsx:717 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":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}