I'm trying to find the Fourier transform of $sgn(t)$ where
$$ sgn(t) = \begin{cases} 1, & t > 0 \\ 0, & t = 0 \\ -1, & t < 0. \end{cases} $$
By definition,
$$ X(\omega) = \int_{-\infty}^{\infty} sgn(t) e^{-i\omega t} \, dt = \int_0^{\infty} e^{-i\omega t} \, dt + \int_{-\infty}^0 -e^{-i\omega t} \, dt. $$
However, that second integral diverges. Where is the flaw in my methodology?
You have correctly deduced that taking the necessary integral in any usual fashion does not give an answer that is a function.
However, there is a way to get the answer as long as you've defined the fourier transform of the functions $f(x) = 1$ and $f(x) = \delta(x)$. In particular, we note that
$$ \operatorname{sgn}(t) = -1 + 2\int_{-\infty}^t \delta(\tau)\,d\tau $$