Port fix for PR #31658 to 1.2.x branch - LogonAction does not check errors in appropriate place
Changed paths: