The Wikipedia article for rotation matrix gives the following formula for converting from rotation matrix, $Q$, to axis-angle, $u$ and $\theta$:
$$ \begin{align} x &= Q_{zy} - Q_{yz} \\ y &= Q_{xz} - Q_{zx} \\ z &= Q_{yx} - Q_{xy} \\ r &= \sqrt{x^2 + y^2 + z^2} \\ t &= Q_{xx} + Q_{yy} + Q_{zz} \\ u &= \frac{1}{r}\begin{bmatrix}x \\ y \\ z \end{bmatrix} \\ \theta &= atan2(r, t - 1) \\ \end{align} $$
The article goes on to say that if the trace is negative then a different approach should be used but it does not go into detail.
A fully robust approach will use different code when t, the trace of the matrix Q, is negative, as with quaternion extraction.
The quoted sentence refers to the earlier portion of the article describing conversion from rotation matrix to quaternion. In that case, the reason to check for a negative trace was that one of the formulas given would produce division by $0$ for a trace of -$1$. That isn't an issue for the formula above. $atan2(y, x)$ produces a signed $arctan(\frac{y}{x})$ but has some special cases, including for when $x = 0$, so there is no risk of division by $0$.
Is a negative trace ever problematic for the formula above? If so, how should a negative trace be handled?
There's a very related question about another Wikipedia article that gives a different formula for this conversion.