Synchronize illegal capture call time error message and trace time error message.
Synchronize illegal capture call time error message and trace time error message.

PiperOrigin-RevId: 398783192

google/jax,google/jax,google/jax,google/jax