different-ai/openwork · error

Failed to disconnect account (${response.status}).

Error message

Failed to disconnect account (${response.status}).

What it means

Error "Failed to disconnect account (${response.status})." thrown in different-ai/openwork.

Source

Thrown at ee/apps/den-web/app/(den)/dashboard/_components/mcp-connections-data.tsx:917

  });
}

export function useDisconnectMyProviderAccount() {
  const queryClient = useQueryClient();
  const { orgId } = useOrgDashboard();

  return useMutation({
    mutationFn: async (connection: Pick<ExternalMcpConnection, "id" | "nativeProviderKey">): Promise<string> => {
      const path = isNativeProviderConnectionId(connection.id, connection.nativeProviderKey)
        ? `/v1/oauth-providers/${encodeURIComponent(connection.id)}/disconnect`
        : `/v1/mcp-connections/${encodeURIComponent(connection.id)}/disconnect-my-account`;
      const { response, payload } = await requestJson(
        path,
        { method: "POST", headers: getOrgScopeHeaders(requireOrgId(orgId)) },
        15000,
      );
      if (!response.ok) {
        throw getRequestError(payload, response, `Failed to disconnect account (${response.status}).`);
      }
      return connection.id;
    },
    onSuccess: () => {
      queryClient.invalidateQueries({ queryKey: mcpConnectionQueryKeys.all });
    },
  });
}

export function useDisconnectMcpConnection() {
  const queryClient = useQueryClient();
  const { orgId, runReauthableAction } = useOrgDashboard();

  return useMutation({
    mutationFn: async (connectionId: string): Promise<string> => {
      let result: string | null = null;
      await runReauthableAction("disconnect-mcp-connection", async () => {
        const { response, payload } = await requestJson(

View on GitHub (pinned to 2b7df46e8a)

When it happens

Trigger: Thrown at ee/apps/den-web/app/(den)/dashboard/_components/mcp-connections-data.tsx:917 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01). Data as JSON: /api/errors/5052824cd3527f2c. Report an issue: GitHub.