We study some Liouville type theorems for weak stable or finite Morse index solutions to the following equation:
\begin{equation*}
\Delta u+e^u+|x|^\alpha e^{\beta u}=0\quad\mathrm{in}\quad\mathbb{R}^N,
\end{equation*}
which arises from the study of selfgravitating cosmic strings for a massive W-boson model coupled with Einstein's equation.