Kong/insomnia · error · Error

Failed to fetch member roles

Error message

Failed to fetch member roles

What it means

Sentinel error thrown by getCurrentUserRoleInOrg: the backend call getOrganizationMemberRoles (which resolves the current user's role in an organization) failed for any reason — network, auth/session expiry, or API error — and the original cause is discarded in favor of this generic message.

Solutions

  1. Re-sign in to refresh the session, then retry the invite modal
  2. Check connectivity to the Insomnia backend API
  3. Inspect the network layer for the underlying getOrganizationMemberRoles failure, since this wrapper hides the original error
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at packages/insomnia/src/ui/components/modals/invite-modal/invite-modal.tsx:705 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Kong/insomnia@d9bb2b0142 (2026-08-26). Data as JSON: /api/errors/b0d5243e59f6074b. Report an issue: GitHub.

Appendix: source

Thrown at packages/insomnia/src/ui/components/modals/invite-modal/invite-modal.tsx:705

    );
  }
  return null;
};

function checkPermissionRefType(
  permissionRef: MutableRefObject<Record<Permission, boolean> | undefined>,
): permissionRef is MutableRefObject<Record<Permission, boolean>> {
  return Boolean(permissionRef.current);
}

/** Get current user's role in an organization */
export async function getCurrentUserRoleInOrg(organizationId: string): Promise<Role> {
  return getOrganizationMemberRoles({
    organizationId,
    sessionId: await getCurrentSessionId(),
    userId: await getAccountId(),
  }).catch(() => {
    throw new Error('Failed to fetch member roles');
  });
}

async function unlinkTeam(organizationId: string, collaboratorId: string) {
  try {
    return await unlinkCollaborator({
      organizationId,
      collaboratorId,
      sessionId: await getCurrentSessionId(),
    });
  } catch (error) {
    throw new Error(error ?? 'Failed to unlink team from organization');
  }
}

async function revokeOrganizationInvite(organizationId: string, invitationId: string) {
  try {
    return revokeInvitation({

View on GitHub (pinned to d9bb2b0142)