Correct span in privacy error

Fix #19062.