Port Bug #33918 to 1.2.x branch - Allow saving errors to the session in the same way as messages
Changed paths: