Fixes XNAT-2989: Updated error message to show more information.
XNAT-2989: Insure that the reasons variable is initialized before we add it to the message